zookeeper

This short How-To post is a companion post to How to Install a Distributed Apache Storm Cluster, and shows how to debug an Apache Zookeeper installation. The debugging methods presented below include starting Zookeeper manually, pinging the Zookeeper server, finding the Zookeeper log files and looking inside for hints and manually purging old Zookeeper data.

Manually Run Zookeeper

The simplest way to debug Zookeeper is to simply start it up manually and verify that it is running.

You should see something like:

If not, check out the log files for more information…

Where are the Zookeeper log files?

After a few days of running the Storm cluster it stopped working, and I needed to debuig what was going on. The first error I saw was on the Storm UI: “org.apache.thrift7.transport.TTransportException: java.net.ConnectException: Connection refused”. After rechecking all the cfg files, I checked to see if nimbus1 could ping zkserver1 on port 2181.

A 0 came back indicating that it could not reach the zookeeper instance. I checked if Zookeeper was running, it was so I needed to look into the zookeeper logs.

Once the log file(s) is located you can open it with:

Reading the logs revealed to me: “java.io.IOException: No space left on device zookeeper”, indicating that the auto purging setup above needed to be tweaked.

Purging Zookeeper Data Manually

To purge old Zookeeper data manually we use a tool called ‘PurgeTxnLog’, which is a class in the `zookeeper.jar’. In order to set the classpath jars, you need to find where they are and what they’re named.

Finally, you can build the correct command to run ‘PurgeTxnLog’.

After running it, you will see that it removed files:

To automatically purge the Zookeeper data, follow the instructions posted at How to Install a Distributed Apache Storm Cluster.

Additional Links

Final Words

There are several reasons why an Apache Zookeeper installation might not work correctly and need debugging. Did this article help you or was there a different issue at hand? If so please leave a message below!

Related Posts

Subscribe To Our Newsletter

Join our low volume mailing list to receive the latest news and updates from our team.

Leave a Comment

Knowm 32X32 Crossbar

Knowm Newsletter

Are you ready for memristor AI processors? With our newsletter, you will be.