After multiple re-tries and changing the bat files, I have finally succeeded in running Kafka and Zookeeper in Windows 7. This is a 32-bit machine running Java 7. Unfortunately though, I am not able to create a topic. I tried using the tutorial here: http://janschulte.wordpress.com/2013/10/13/apache-kafka-0-8-on-windows/
I executed the command:
C:\Cambria\kafka_2.8.0-0.8.0>bin\kafka-create-topic.bat --zookeeper localhost:2181 --replica 1 --partition 1 --topic topic
and end up with the following error:
Exception in thread "main" joptsimple.UnrecognizedOptionException: 'û' is not a recognized option
at joptsimple.OptionException.unrecognizedOption(OptionException.java:89)
at joptsimple.OptionParser.validateOptionCharacters(OptionParser.java:586)
at joptsimple.OptionParser.handleShortOptionCluster(OptionParser.java:511)
at joptsimple.OptionParser.handleShortOptionToken(OptionParser.java:506)
at joptsimple.OptionParserState$2.handleArgument(OptionParserState.java:59)
at joptsimple.OptionParser.parse(OptionParser.java:433)
at kafka.admin.CreateTopicCommand$.main(CreateTopicCommand.scala:56)
at kafka.admin.CreateTopicCommand.main(CreateTopicCommand.scala)
All the classpath entries are proper and the requisite JAR files are also present. Am not sure what the issue is. Can someone help me on this?
P.S: I tried this with Cygwin and am encountering the Class Not Found error although the classpath is being properly set.
For people who just started to play with kafka and encountered this problem (but on Unix machine), this is due to the outdated tutorial you are following.
In the latest version, you have to use
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
to create topic.
run bin\kafka-create-topic.bat to see available options then for example you will see broker-list and all required parameters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With