简体   繁体   中英

Docker zookeeper image unable to connect to sheepkiller/kafka-manager image

I am using two images sheepkiller/kafka-manager/ (Tool from Yahoo Inc) but the image was made by someone with a weird sense of humor but it has good reviews.

And zookeeper

I start ZooKeeper

docker run --it --restart always -d zookeeper

then try to start apache manager

docker run -it --rm  -p 9000:9000 -e ZK_HOSTS="your-zk.domain:2181" -e APPLICATION_SECRET=letmein sheepkiller/kafka-manager

Document says:

(if you don't define ZK_HOSTS, default value has been set to "localhost:2181")

Error:

Initiating client connection, connectString=localhost:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@7bf272d3 [info] oazClientCnxn - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) [info] kmaKafkaManagerActor - zk=localhost:2181 [info] kmaKafkaManagerActor - baseZkPath=/kafka-manager [warn] oazClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect

I am using Docker version 17.12.0-ce, build c97c6d6 on windows 10. I have tried several different things but was unsuccessful. I am assuming there is an issue with the ports, I zookeeper config file and /sheepkiller/kafka-manager/dockerfile/ but I am not sure how to change these images after I already pulled them if that really is the case.

The following should work fine:

docker network create zookeeper-net
docker run -it --restart always -p 2181:2181 --network zookeeper-net --name zookeeper -d zookeeper
docker run -it --rm  -p 9000:9000 -e ZK_HOSTS="zookeeper:2181" -e APPLICATION_SECRET=letmein sheepkiller/kafka-manager

Update :

There is also a compose file to setup everything. I suggest you use that.

docker-compose up -d

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM