Resolving a Common Error in Apache Zookeeper
Explains how to resolve: Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain” when starting Apache Zookeeper.
Join the DZone community and get the full member experience.
Join For FreeThis miniature article explains how to resolve the following error:
Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain
This appears when we start the Apache Zookeeper (apache-zookeeper-3.5.6.tar.gz) installed on a multi-node cluster. Distributed systems/applications leverage the service offers by Apache Zookeeper to manage their synchronization, configuration service as well as naming registry.
Apache Zookeeper is a primary backbone for Hadoop, Kafka, HBase, Tableau, etc. The aforementioned error displays on the console when executing the script zkServer.sh with the input parameter start
available inside the bin directory. This happens due to the unavailability of the lib directory that holds the zookeeper-3.5.6.jar file.
Instead of extract/install apache-zookeeper-3.5.6.tar.gz
on each node in the cluster, we should proceed with apache-zookeeper-3.5.6-bin.tar.gz
, which has all the required jar files inside the lib directory. This binary can be downloaded from the following link found here.
Opinions expressed by DZone contributors are their own.
Comments