Support Questions
Find answers, ask questions, and share your expertise

Re: Error while executing topic command : replication factor: 1 larger than available brokers: 0

Explorer

Hi, here i have attached the zookeeper screenshot for your reference. zookeeper-screenshot.png

Re: Error while executing topic command : replication factor: 1 larger than available brokers: 0

Expert Contributor

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.

Re: Error while executing topic command : replication factor: 1 larger than available brokers: 0

Expert Contributor

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.

Re: Error while executing topic command : replication factor: 1 larger than available brokers: 0

Explorer

I ran as you said. This is the screenshot for the output.

zoo-out.png

Re: Error while executing topic command : replication factor: 1 larger than available brokers: 0

Expert Contributor

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

Re: Error while executing topic command : replication factor: 1 larger than available brokers: 0

Cloudera Employee

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.