You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble running this container against my local, native instance of zookeeper (native docker on OS/X). Should this work?
I've tried:
docker run ches/kafka docker run --env ZOOKEEPER_IP=127.0.0.1 ches/kafka docker run --env ZOOKEEPER_CONNECTION_STRING=localhost:2181 ches/kafka
but always get the error:
[2016-10-26 22:00:20,317] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
The text was updated successfully, but these errors were encountered:
Unfortunately --network=host as @xrl suggested doesn't work as expected on macOS, that would otherwise be the most straightforward solution when you want to share a service from the host with containers. This is surprising since they have made docker run -p port mapping to the host work.
It should work on your host's external IP though, if you've got ZooKeeper listening on 0.0.0.0 and that's acceptable:
$ docker run -e ZOOKEEPER_IP=$(ipconfig getifaddr en0) ches/kafka
assuming en0 is your connected interface. Since this IP probably changes, Docker suggests creating a stable alias to the loopback as a workaround, and that can let you avoid exposing ZK to the Internet too.
As a small clarification, docker run doesn't create a new network for every container, by default it connects containers to the built-in bridge network that appears in docker network ls. This corresponds to the docker0 interface which is now in the xhyve VM of current Docker on macOS, hence this difficulty 😞
I'm having trouble running this container against my local, native instance of zookeeper (native docker on OS/X). Should this work?
I've tried:
docker run ches/kafka
docker run --env ZOOKEEPER_IP=127.0.0.1 ches/kafka
docker run --env ZOOKEEPER_CONNECTION_STRING=localhost:2181 ches/kafka
but always get the error:
The text was updated successfully, but these errors were encountered: