Sanjay
Sanjay

Reputation: 443

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?

Upvotes: 14

Views: 16748

Answers (3)

Richard B
Richard B

Reputation: 935

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

Upvotes: 1

HISI
HISI

Reputation: 4797

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

Upvotes: 4

Kamal Chandraprakash
Kamal Chandraprakash

Reputation: 2002

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

Upvotes: 35

Related Questions