- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Error while executing topic command : replication factor: 1 larger than available brokers: 0
- Labels:
-
Apache Kafka
Created ‎02-23-2017 08:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
This is the command I ran.
bin/kafka-topics.sh --create --zookeeper cmtoldhwdpadm03.dev.bmocm.com:2181 --replication-factor 1 --partitions 1 --topic test21 Error while executing topic command : replication factor: 1 larger than available brokers: 0
I am getting the below error.
ERROR kafka.admin.AdminOperationException: replication factor: 1 larger than available brokers: 0 at kafka.admin.AdminUtils$.assignReplicasToBrokers(AdminUtils.scala:117) at kafka.admin.AdminUtils$.createTopic(AdminUtils.scala:403) at kafka.admin.TopicCommand$.createTopic(TopicCommand.scala:110) at kafka.admin.TopicCommand$.main(TopicCommand.scala:61) at kafka.admin.TopicCommand.main(TopicCommand.scala) (kafka.admin.TopicCommand$)
But, I am seeing in Ambari, There are two brokers has been started. Please help me. Thanks.
Created ‎02-23-2017 08:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, here i have attached the zookeeper screenshot for your reference. zookeeper-screenshot.png
Created ‎02-23-2017 08:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
understand that your zookeeper is running. Want you to run zkCli at the command line, so that we can check whether it can connect from nodes to the zookeeper server.
Created ‎02-23-2017 09:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
not sure what are the url for your zookeeper sever. you should run as /usr/hdp/current/zookeeper-server/bin/zkCli.sh -server cmtoldhwdpadm03.dev.bmocm.com:2181 if cmtoldhwdpadm03.dev.bmocm.com is your zookeeper server.
Created ‎02-23-2017 09:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ran as you said. This is the screenshot for the output.
Created ‎02-23-2017 09:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
from your picture, it looks like you have a zookeeper on cmtoldhwdpadm01.dev.bmocm.com, how about cmtoldhwdpadm02, and cmtoldhwdpadm03? Are there zookeeper running on those two?
Now, please follow the steps below:
/usr/hdp/current/zookeeper-server/bin/zkCli.sh -server cmtoldhwdpadm01.dev.bmocm.com
ls /brokers/ids/ <-- here you should see two ids as there are two broker nodes
get /brokers/ids/<id1> and <id2> <--- Please share the output
Created ‎12-06-2019 01:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Just check the value of "zookeeper.chroot"(znode in ZooKeeper used as a root for Kafka cluster) property in your Kafka configurations. According to the command, which you have mentioned, it should be '/'.
i.e connect to the correct znode for kafka.
Created ‎09-30-2021 12:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I too had the same issue.
Check for zookeeper.chroot value. As zookeeper and Kafka have tight integration.
In my case i had given /kafka.

- « Previous
-
- 1
- 2
- Next »