Skip to content

(Resolved) zookeeper is not a recognized option – Kafka

Advertisement

Problem

Recently, I installed Apache Kafka on the Ubuntu system. When tried to run the consumer console script, I found the error message that “zookeeper is not a recognized option”.

./bin/kafka-console-consumer.sh --topic testTopic --zookeeper localhost:9092 
zookeeper is not a recognized option
Option                                   Description
------                                   -----------
--bootstrap-server 
--consumer-property                            properties in the form key=value to
...
...

Solution

After searching a bit time, I visited to Apache Kafa QUICKSTART guide. Here I found the solution that Kafka has removed --zookeeper option and replaced it with a new option --bootstrap-server .

So the new command would be like:

./bin/kafka-console-consumer.sh --topic testTopic --bootstrap-server  localhost:9092 

Hope this will help you to resolve the Kafka issue.

Rahul

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

1 Comment

  1. Use the bootstrap-server instead
    kafka-topics.sh –bootstrap-server 127.0.0.1:2181 –topic first_topic –create –partitions 3 –replication-factor 1
    Good luck

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top