[SOLVED] No route to host - connectivity problem between kafka and zookeeper

Hi,

I was using 2 docker containers and the second can’t connect the first.
These are the containers (see the link):

  $ docker run -d --name zookeeper jplock/zookeeper:3.4.6
  $ docker run -d --name kafka --link zookeeper:zookeeper ches/kafka
  • My env is linux mint 17.1.
  • The problem doesn’t occurs when using docker.io installation (installed from mint/ubuntu repository, but it is too old docker - ver-1.0.1)
  • The problem only happens when I am running with the docker that is installed from the web (“wget -qO- https://get.docker.com/ | sh”).
  • Running ping from the “kafka” docker to the “zookeeper” I can see that the connectivity exists.
  • The problem exists in 2 linux-mint" machine but not in a third one (all were updated in the same way - apt-get update/upgrade).
  • I have cleaned and reinstall docker (stop service, uninstall, reboot, install)
  • The error from the log can be found below.

** Any idea will be valued!


the log
[2015-06-25 13:52:13,000] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
[2015-06-25 13:52:13,000] INFO Client environment:java.compiler= (org.apache.zookeeper.ZooKeeper)
[2015-06-25 13:52:13,000] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
[2015-06-25 13:52:13,000] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
[2015-06-25 13:52:13,000] INFO Client environment:os.version=3.13.0-37-generic (org.apache.zookeeper.ZooKeeper)
[2015-06-25 13:52:13,000] INFO Client environment:user.name=kafka (org.apache.zookeeper.ZooKeeper)
[2015-06-25 13:52:13,000] INFO Client environment:user.home=/kafka (org.apache.zookeeper.ZooKeeper)
[2015-06-25 13:52:13,000] INFO Client environment:user.dir=/kafka (org.apache.zookeeper.ZooKeeper)
[2015-06-25 13:52:13,001] INFO Initiating client connection, connectString=172.17.0.14:2181 sessionTimeout=10000 watcher=org.I0Itec.zkclient.ZkClient@2c735375 (org.apache.zookeeper.ZooKeeper)
[2015-06-25 13:52:13,020] INFO Opening socket connection to server /172.17.0.14:2181 (org.apache.zookeeper.ClientCnxn)
[2015-06-25 13:52:14,033] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.NoRouteToHostException: No route to host
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1146)
[2015-06-25 13:52:15,549] INFO Opening socket connection to server zookeeper/172.17.0.14:2181 (org.apache.zookeeper.ClientCnxn)
[2015-06-25 13:52:16,551] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.NoRouteToHostException: No route to host
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1146)


I’ve found a solution:
remove any installed docker.
install a specific version:

sudo aptitude install lxc-docker-1.6.2 

This version works fine and it is also not old.
This 1.6.2 is not in the repository of mint/ubuntu I had to install first the web script, then uninstall docker and finally install using the above commend
The following will be required as well:

 sudo aptitude install apparmor