Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to start any kafka processes

Tags:

apache-kafka

The instructions for running kafka from the quick start page are not working for me.

http://kafka.apache.org/07/quickstart.html

Kafka builds fine

05:55:01/kafka-0.8.1-src:58 $sbt package
[info] Set current project to kafka-0-8-1-src (in build file:/shared/kafka-0.8.1-src/)
[info] Packaging /shared/kafka-0.8.1-src/target/scala-2.10/kafka-0-8-1-src_2.10-0.1-SNAPSHOT.jar ...
[info] Done packaging.
[success] Total time: 0 s, completed Apr 17, 2014 5:55:07 AM

But does not run fine..

05:55:07/kafka-0.8.1-src:59 $bin/zookeeper-server-start.sh config/zookeeper.properties
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/zookeeper/server/quorum/QuorumPeerMain
Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.server.quorum.QuorumPeerMain
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Similar errors occur for kafka-server-start.sh and all the other scripts inside bin

like image 337
WestCoastProjects Avatar asked Apr 17 '14 12:04

WestCoastProjects


1 Answers

You downloaded kafka-0.8.1-src.tgz from download page. The instructions on quickstart link are meant for Binary download . Download one from the Binary downloads section of http://kafka.apache.org/downloads.html page. Now try .It should work.
Or if you want to build from the src.tgz package you downloaded, then run ./gradlew jar. It will download all the required dependencies.

like image 88
Chandra kant Avatar answered Jan 04 '23 10:01

Chandra kant