**Posted in Hazelcast as well.**
I am having issues with getting Vert.x, in a cluster configuration, working properly from within docker containers. This appears to be with the usage of hazelcast to do cluster member detection. The scenario is as follows:
I have a working situation when the docker containers are all running on a single node using the default multicast configuration.
-->DOCKER-CONTAINER-A(172.17.0.37)
-->DOCKER-CONTAINER-B(172.17.0.38)
In this scenario everything works as expected because multicast across the docker host network interface (172.17.42.1) in this case. Both containers can access each others network interfaces across the host, i.e. 172.17.0.37 can talk to 172.17.0.38. Every one is happy, and this can scale across one node.
The scenario that I am having difficulty with is where there are multiple hosts involved, thus not sharing the docker host interface.
-->DOCKER-CONTAINER-A(172.17.0.37)
-->DOCKER-CONTAINER-A(172.17.0.11)
I am using mesos to run containers so there will also be another level of port redirection but for my simple test case I am only using and running one docker container on each node. The containers are exposing port 5701 on the host, i.e.
amazo1.ott.qnx.com:5701 is accessible. In this scenario multicast will not work so i need to move to a static tcp.ip cluster setup. I have modified the cluster.xml configuration to add HOST-A/DOCKER-CONTAINER-A as a cluster, i.e.
<network>
<port auto-increment="false">5701</port>
<join>
<multicast enabled="false">
<multicast-group>224.2.2.3</multicast-group>
<multicast-port>54327</multicast-port>
</multicast>
<tcp-ip enabled="true">
</tcp-ip>
</join>
Here is where the issue happens.
** HOST-A/DOCKER-CONTAINER-A the following occurs:
[172.17.0.37]:5701 [dev] Hazelcast Community Edition 2.6.6 (20140123) starting at Address[172.17.0.37]:5701
[172.17.0.37]:5701 [dev] Copyright (C) 2008-2013 Hazelcast.com
[172.17.0.37]:5701 [dev] Address[172.17.0.37]:5701 is STARTING
[172.17.0.37]:5701 [dev]
Members [1] {
Member [172.17.0.37]:5701 this
}
[172.17.0.37]:5701 [dev] Wrong bind request from Address[172.17.0.11]:5701! This node is not requested endpoint: Address[
amazo1.ott.qnx.com]:5701
** HOST-B/DOCKER-CONTAINER-A the following occurs:
[172.17.0.11]:5701 [dev] Hazelcast Community Edition 2.6.6 (20140123) starting at Address[172.17.0.11]:5701
[172.17.0.11]:5701 [dev] Copyright (C) 2008-2013 Hazelcast.com
[172.17.0.11]:5701 [dev] Address[172.17.0.11]:5701 is STARTING
[172.17.0.11]:5701 [dev] Connection [Address[
amazo1.ott.qnx.com]:5701] lost. Reason: java.io.EOFException[null]
To me what looks like is happening is that the "announced"(correct term?) address in hazelcast is the local address within the docker container, i.e. 172.17.0.11, which is not reachable by HOST-A/DOCKER-CONTAINER-A.
I think for this scenario I need a way to bind to the local interface, i.e. 172.17.0.11, but announce my public address, as
amazo2.ott.qnx.com/10.222.108.245. I do not see anyway in which that can be accomplished. I have tried at the "vertex run" level to use the -cluster-host but this is expecting an address that is local to the docker interfaces.
Any insight/experience would be greatly appreciated
Kristopher