Starting Zookeeper Cluster. Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain

I got the Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain, because I had downloaded the apache-zookeeper-X.X.X.tar.gz file and not the apache-zookeeper-X.X.X.bin.tar.gz file. Downloading, untarring and using the bin.tar file fixed it for me. You can also build the binaries from the apache-zookeeper-X.X.X.tar.gz file; see the answer of @vincent.

Why does zookeeper not use my log4j.properties file log directory

I wanted to add how I fixed this problem / customized my environment. There are 2 logging mechanisms working here: bin/zkServer.sh redirects the zookeeper server’s stdout and stderr to zookeeper.out log4j can append to logs to several places including: CONSOLE – which ends up in zookeeper server’s stdout and stderr ROLLINGFILE – which is sent … Read more

Kafka Broker doesn’t find cluster id and creates new one after docker restart

If you are 100% sure you are connecting to the right ZooKeeper and the right Kafka log directories, but for some reason things don’t match and you don’t feel like losing all your data while trying to recover: The Kafka data directory (check config/server.properties for log.dirs property, it defaults to /tmp/kafka-logs) contains a file called … Read more

How to get data from old offset point in Kafka?

The consumers belong always to a group and, for each partition, the Zookeeper keeps track of the progress of that consumer group in the partition. To fetch from the beginning, you can delete all the data associated with progress as Hussain refered ZkUtils.maybeDeletePath(${zkhost:zkport}”, “/consumers/${group.id}”); You can also specify the offset of partition you want, as … Read more

Zookeeper connection error

I just have the same situation as you and I have just fixed this problem. It is the reason that you have configured even number of zookeepers which directly result in this problem,try to change your number of zookeeper node to a odd one. for example the original status of my zookeeper cluster is consisted … Read more

Why do we need ZooKeeper in the Hadoop stack?

Hadoop 1.x does not use Zookeeper. HBase does use zookeeper even in Hadoop 1.x installations. Hadoop adopted Zookeeper as well starting with version 2.0. The purpose of Zookeeper is cluster management. This fits with the general philosophy of *nix of using smaller specialized components – so components of Hadoop that want clustering capabilities rely on … Read more