Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Could not find or load main class config.zookeeper.properties

I am trying to execute a sample producer consumer application using Apache Kafka. I downloaded it from https://www.apache.org/dyn/closer.cgi?path=/kafka/0.10.0.0/kafka-0.10.0.0-src.tgz . Then I started following the steps given in http://www.javaworld.com/article/3060078/big-data/big-data-messaging-with-kafka-part-1.html.

When I tried to run bin/zookeeper-server-start.sh config/zookeeper.properties, I am getting Error: Could not find or load main class config.zookeeper.properties I googled about the issue but didn't get any useful information on this. Can anyone help me to continue?

like image 313
Sanjay Avatar asked Jun 30 '16 07:06

Sanjay


3 Answers

You've downloaded the source package. Download the binary package of Kafka and do testing.

like image 77
Kamal Chandraprakash Avatar answered Nov 20 '22 18:11

Kamal Chandraprakash


You have to download the binary version from the official Kafka web site.

like image 4
HISI Avatar answered Nov 20 '22 20:11

HISI


Assuming you have the correct binary version check to see that you do not already have CLASSPATH defined in your environment. If you do and the defined CLASSPATH has a space in it (e.g.C:\Program Files\<>) then neither zookeeper or kafka will start.

To solve this either delete your existing CLASSPATH or modify the startup script that builds the zookeeper and kafka CLASSPATH values, putting your CLASSPATH entry in double quotes before the path is built

like image 1
Richard B Avatar answered Nov 20 '22 19:11

Richard B