Hi Esen,

I've just been through the same problem, but have a solution.

Basically, Hazelcast attaches itself to the private ip address of the 
docker container, and notifies other nodes of this ip address (meaning that 
it does not ever match the members). There are two solutions...

1. Use *docker run --net=host* to run the docker container (works ok, but 
the container is therefore not running in it's separate network).
2. Pass the private/public IP address of the machine to the docker 
container so that Hazelcast knows which IP address to bind to.

   1. Add <properties><property name="hazelcast.local.localAddress"
   >IPV4ADDRESSHERE</property></properties> into hazelcast.xml
   2. Add <network><public-address>IPV4ADDRESSHERE</public-address></network
   >

I've setup a docker container to do exactly this, which can be used to 
setup a distributed OrientDB running on CoreOS using Fleet (fleetctl). This 
will work on Vagrant or Amazon EC2/VPC.

The repository is available 
here: https://github.com/abcum/docker-orientdb.git

Tobie


On Tuesday, 6 January 2015 07:19:42 UTC, Esen Sagynov wrote:
>
> I can successfully telnet to each server from any other server because 
> incoming requests are allowed. In fact, each server successfully receives a 
> connection request, however, there seems to be some kind of a validation. 
> When the host A receives a connection request from host B, host A checks if 
> the requested IP address is host A's IP address. Now here this validation 
> fails according to the above error message.
>
> I wonder if it is necessary to do such validations in ODB?
>
> On Monday, January 5, 2015 9:27:31 PM UTC+9, Lvc@ wrote:
>>
>> Hi Esen,
>> Seems OrientDB servers can't see each other. I suggest you to try if 
>> connections are allowed between hosts with CURL.
>>
>> Lvc@
>>
>>
>> On 5 January 2015 at 07:19, Esen Sagynov <kadi...@gmail.com> wrote:
>>
>>> Using ODB 2.0-SNAPSHOT (Jan 5, 2015).
>>>
>>> My nodes in Docker containers on separate physical machines cannot join 
>>> to each other. The establish a connection however eventually they refuse 
>>> joining because some conditions aren't met.
>>>
>>> The following are logs on Host 2:
>>>
>>> 2015-01-05 06:07:15:691 INFO  [172.17.0.3]:2434 [orientdb] [3.3] 
>>> Accepting socket connection from /123.123.123.124:55647 [SocketAcceptor]
>>> 2015-01-05 06:07:15:692 INFO  [172.17.0.3]:2434 [orientdb] [3.3] 
>>> Established socket connection between /172.17.0.3:2434 and /123.123.
>>> 123.124:55647 [TcpIpConnectionManager]
>>> 2015-01-05 06:07:15:694 WARNING [172.17.0.3]:2434 [orientdb] [3.3] Wrong 
>>> bind request from Address[172.17.0.12]:2434! This node is not requested 
>>> endpoint: Address[123.123.123.124]:2434 [TcpIpConnectionManager]
>>>
>>> Host 1 (123.123.123.123) running ODB in a container 172.17.0.3:2434.
>>> Host 2 (123.123.123.124) running ODB in a container 172.17.0.12:2434.
>>> Host 3 (123.123.123.125) running ODB in a container 172.17.0.10:2434.
>>>
>>> Because docker on each host manages its own bridge each ODB container 
>>> doesn't see it directly. This is why in config/hazelcast.xml I specify the 
>>> IP of the host machines.
>>>
>>>                         <tcp-ip enabled="true">
>>>                                 <member> 123.123.123.123:2434</member>
>>>                                 <member> 123.123.123.124:2434</member>
>>>                                 <member> 123.123.123.125:2434</member>
>>>                         </tcp-ip>
>>>
>>> All ODB containers expose all 3 ports (2424, 2480, 2434). I can telnet 
>>> and ping. However, because each container requests a dynamic docker IP 
>>> address, each node cannot join the same cluster because host IP doesn't not 
>>> match the actual Docker IP inside the container as shown in the above error 
>>> log.
>>>
>>> Any solutions for this?
>>>
>>> -- 
>>>
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "OrientDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to orient-databa...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to