lhotari opened a new pull request #223: URL: https://github.com/apache/pulsar-helm-chart/pull/223
### Motivation There seem to be problems with the Zookeeper "ruok" probes when using recent version of Zookeeper with org.apache.zookeeper.server.NettyServerCnxnFactory . @frederic-kneier contributed a fix in https://github.com/apache/pulsar/pull/14088 where `-q 1` parameter is added to the `nc` command. ### Modications Replace `bin/pulsar-zookeeper-ruok.sh` probe with `bash -c 'echo ruok | nc -q 1 localhost 2181 | grep imok'` ### Additional context Here's some parts of the man page for netcat-openbsd nc ``` -N shutdown(2) the network socket after EOF on the input. Some servers require this to finish their work. -q seconds after EOF on stdin, wait the specified number of seconds and then quit. If seconds is negative, wait forever (default). Specifying a non-negative seconds implies -N. ``` There's some explanation in https://stackoverflow.com/questions/4160347/close-vs-shutdown-socket/23483487 about shutdown vs. close for TCP sockets. When specifying `-q `, netcat (nc) will call "shutdown" for the socket after waiting for 1 socket. This sends a TCP FIN to the other end and starts a clean connection shutdown. I guess that the default for netcat-openbsd is that it will wait for the other end to close the connection unless `-q 1` is specified. This feels like a bug in Zookeeper. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org