Error creating Kafka Topics- Replication factor larger than available brokers

前端 未结 15 2034
时光取名叫无心
时光取名叫无心 2020-12-30 18:30

I am trying to create topics in Kafka by following the guide on Apache Kafka website through command line. While running the command:

bin/kafka-topics.sh --c         


        
15条回答
  •  余生分开走
    2020-12-30 18:53

    In my case the error was caused by the fact that I started creating topics before the zookeeper became available. Since I did everything in a script, introducing some latency before creating topics helped. If your zookeeper client port is 2181, you can check the availability of your brokers by:

    echo dump | nc zookeeper 2181 | grep brokers
    

提交回复
热议问题