14

I have an Ubuntu-12.04 VM running on my laptop.I have installed zookeeper on it using the command

sudo apt-get install zookeeper

Now for traditional Ubuntu programs I check the version using --version command line option. For example

gcc --version

gives the version of gcc as 4.6.3 (for e.g)

Similarly how do I find out the version of zookeeper? First of all it doesn't have a binary called zookeeper. It does have a binary called zooinspector which does not respond to `--version.

I am very new to zookeeper. Any help would be appreciated.

muru
  • 207,228
liv2hak
  • 267

1 Answers1

29

First you need to have a running Zookeeper server-instance.

Open a terminal, and start the Zookeeper server:

/usr/share/zookeeper/bin/zkServer.sh start-foreground

Note: Zookeeper will not start unless it can write to it's datadir and logfile.

Open another terminal, and replace zkserver1 with the hostname\ip eg. 127.0.0.1 :

echo ruok | nc zkserver1 2181
echo status | nc zkserver1 2181

First line should respond with imok Second line should respond with Zookeeper version + more.

Anders F. U. Kiær
  • 2,171
  • 1
  • 18
  • 29