Closed divgo closed 5 years ago
As per official documentation
Please elaborate why do you think this setting is missing.
I am also facing the same. with the client port missing, the server starts but does not listen to any port. workaround is to mount your own complete zoo.cfg with the client port which means NONE of the environment variables are used ( as zoo.cfg exists ).
Perhaps we should also allow the port to be set in the environment instead of hard coding to 2181
By default the image is configured to listen the default client port:
$ docker run --name my_zookeeper -d -p 2181:2181 zookeeper:latest
1a4b5df5409b19209b59bb32b7647a7b782db76f0be8e1fa52463e47931a7766
$ echo "ruok" | nc localhost 2181
ruok is not executed because it is not in the whitelist.
If you need to change the client port value it's doable using ZOO_SERVERS
environment variable:
$ docker run --name my_zookeeper -d -p 31337:31337 -e "ZOO_SERVERS=server.1=localhost:2888:3888;31337" zookeeper:latest
4e5d51c5966f521caf6106efaac9777fd8125df562341128b45408e59f189b1d
$ echo "ruok" | nc localhost 31337
ruok is not executed because it is not in the whitelist.
Closing it because the PR seems to be inactive for quite some time now.
re-add clientPort=2181 - which was missing.