I recently installed a new ZK node w/ Exhibitor, it started fine. When I do a telnet localhost 2181
and then run a stats
to see the version, even though I installed 3.4.11, I keep seeing 3.4.5 build in the output. I tried to find where does ZooKeeper read the version number but it's just a .jar and some lib files. Do you know where can I get the "real" version I'm supposed to be running? Thanks!
This is what I see when doing telnet
:
myserver:/tmp/zookeeper # telnet localhost 2181
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
stats
Zookeeper version: 3.4.5-1392090, built on 09/30/2012 17:52 GMT
Clients:
/127.0.0.1:53133[0](queued=0,recved=1,sent=0)
Latency min/avg/max: 0/0/0
Received: 41
Sent: 40
Connections: 1
Outstanding: 0
Zxid: 0x0
Mode: standalone
Node count: 4
Connection closed by foreign host.
Running process (ps aux | grep zookeeper
) shows:
myuser 19002 0.9 1.2 2618596 49596 ? Sl 14:02 0:00 /usr/pkgs/java/1.8.0.92/bin/java -Dzookeeper.log.dir=/var/run/zookeeper/log -Dzookeeper.root.logger=WARN,ROLLINGFILE -cp /opt/zookeeper-server/default/bin/../build/classes:/opt/zookeeper-server/default/bin/../build/lib/*.jar:/opt/zookeeper-server/default/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/zookeeper-server/default/bin/../lib/slf4j-api-1.6.1.jar:/opt/zookeeper-server/default/bin/../lib/netty-3.10.5.Final.jar:/opt/zookeeper-server/default/bin/../lib/log4j-1.2.16.jar:/opt/zookeeper-server/default/bin/../lib/jline-0.9.94.jar:/opt/zookeeper-server/default/bin/../lib/exhibitor-1.6.0.jar:/opt/zookeeper-server/default/bin/../lib/audience-annotations-0.5.0.jar:/opt/zookeeper-server/default/bin/../zookeeper-3.4.11.jar:/opt/zookeeper-server/default/bin/../src/java/lib/*.jar:/var/run/zookeeper/conf: -server -Xmx1g -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false org.apache.zookeeper.server.quorum.QuorumPeerMain /var/run/zookeeper/conf/zoo.cfg
To check if Zookeeper is accessible. One method is to simply telnet to the proper port and execute the stats command. root@host:~# telnet localhost 2181 Trying 127.0.
ZooKeeper is an open source Apache project that provides a centralized service for providing configuration information, naming, synchronization and group services over large clusters in distributed systems. The goal is to make these systems easier to manage with improved, more reliable propagation of changes.
For example, on Windows, the default directory for the Kafka on-disk topic queues is C:\ProgramData\Esri\GeoEvent-Gateway\kafka\logs, and the Zookeeper configuration files default directory is C:\ProgramData\Esri\GeoEvent-Gateway\zookeeper-data.
ZooKeeper supports four letter commands, assuming you're running ZooKeeper on localhost:
$ echo "status" | nc localhost 2181 | head -n 1
Zookeeper version: 3.4.9-3--1, built on Fri, 24 May 2019 08:57:53 +0100
using some bash magic, you can filter out the main version:
$ echo "status" | nc localhost 2181 | head -n 1 | awk '{ print $3}' | cut -d "-" -f 1
cat zookeeper-server.log | grep zookeeper.version
.... INFO Server environment:zookeeper.version=3.5.7-f0fdd52973d373ffd9c86b81d99842dc2c7f660e, built on 02/10/2020 11:30 GMT (org.apache.zookeeper.server.ZooKeeperServer) .....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With