14
votes

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?

3
You've downloaded the source package. Download the binary package of Kafka and do testing. apache.org/dyn/closer.cgi?path=/kafka/0.10.0.0/…Kamal Chandraprakash
@KamalC Thanks a lot..! Worked fine. Can you please put this as answer?Sanjay

3 Answers

35
votes

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

4
votes

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

1
votes

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