Skip to content

(Resolved) zookeeper is not a recognized option – Kafka

Covers
Kafka
On this page

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

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

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