14

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?

Sanjay
  • 443
  • 1
  • 7
  • 22
  • 2
    You've downloaded the source package. Download the binary package of Kafka and do testing. https://www.apache.org/dyn/closer.cgi?path=/kafka/0.10.0.0/kafka_2.11-0.10.0.0.tgz – Kamal Chandraprakash Jun 30 '16 at 09:25
  • @KamalC Thanks a lot..! Worked fine. Can you please put this as answer? – Sanjay Jun 30 '16 at 09:52

3 Answers3

35

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

Kamal Chandraprakash
  • 1,872
  • 18
  • 28
4

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

William Price
  • 4,033
  • 1
  • 35
  • 54
HISI
  • 4,557
  • 4
  • 35
  • 51
1

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

Richard B
  • 895
  • 13
  • 39