Cloudera Labs
Provide feedback on Cloudera Labs
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

KeeperErrorCode = NoNode for /brokers/ids

Solved Go to solution

KeeperErrorCode = NoNode for /brokers/ids

Hi Kafka Guru,

 

I really can't figure out why I can't create a Kafka topic for validation testing. Below is my creation command and I ran this commond on the zookeeper node.

 

kafka-topics --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic testkafka

 

Here is a very well known error message:

 

Error while executing topic command org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /brokers/ids
org.I0Itec.zkclient.exception.ZkNoNodeException: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /brokers/ids
at org.I0Itec.zkclient.exception.ZkException.create(ZkException.java:47)
at org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:685)
at org.I0Itec.zkclient.ZkClient.getChildren(ZkClient.java:413)
at org.I0Itec.zkclient.ZkClient.getChildren(ZkClient.java:409)
at kafka.utils.ZkUtils$.getChildren(ZkUtils.scala:480)
at kafka.utils.ZkUtils$.getSortedBrokerList(ZkUtils.scala:81)
at kafka.admin.AdminUtils$.createTopic(AdminUtils.scala:154)
at kafka.admin.TopicCommand$.createTopic(TopicCommand.scala:86)
at kafka.admin.TopicCommand$.main(TopicCommand.scala:50)
at kafka.admin.TopicCommand.main(TopicCommand.scala)
Caused by: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /brokers/ids
at org.apache.zookeeper.KeeperException.create(KeeperException.java:111)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1468)
at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1496)
at org.I0Itec.zkclient.ZkConnection.getChildren(ZkConnection.java:99)
at org.I0Itec.zkclient.ZkClient$2.call(ZkClient.java:416)
at org.I0Itec.zkclient.ZkClient$2.call(ZkClient.java:413)
at org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:675)
... 8 more

 

On my Cloudera Manager Enterprise 5.2, below are Broker configuration properties:

Service-Wide:

  Zookeeper Root (zookeeper.chroot)                     /kakfa

  Kafka Broker Default Group (Broker.id)                Default value (empty). I reset it to 1 then restart both Broker and zookeeper nodes but still not fixed.

 

Where else should I look into to get this issue resloved?

 

Your help is really appreciated.

Thanks,

Silaphet

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: KeeperErrorCode = NoNode for /brokers/ids

Contributor

You need to use:

 

kafka-topics --create --zookeeper localhost:2181/kafka --replication-factor 1 --partitions 1 --topic testkafka

 

Note the extra "/kafka" after the ZK url.

5 REPLIES 5
Highlighted

Re: KeeperErrorCode = NoNode for /brokers/ids

Contributor

You need to use:

 

kafka-topics --create --zookeeper localhost:2181/kafka --replication-factor 1 --partitions 1 --topic testkafka

 

Note the extra "/kafka" after the ZK url.

Re: KeeperErrorCode = NoNode for /brokers/ids

That did it.

 

Thanks again for your quick response.

 

Thanks,

Silaphet

Re: KeeperErrorCode = NoNode for /brokers/ids

New Contributor

Hi,

 

Even i have same issue 

 

Error Details:

org.I0Itec.zkclient.exception.ZkNoNodeException: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /brokers/ids
at org.I0Itec.zkclient.exception.ZkException.create(ZkException.java:47)
at org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:685)
at org.I0Itec.zkclient.ZkClient.getChildren(ZkClient.java:413)
at org.I0Itec.zkclient.ZkClient.getChildren(ZkClient.java:409)
at kafka.utils.ZkUtils$.getChildren(ZkUtils.scala:462)
at kafka.utils.ZkUtils$.getSortedBrokerList(ZkUtils.scala:78)
at kafka.admin.AdminUtils$.createTopic(AdminUtils.scala:170)
at com.contentpipeline.provenance.notification.NotificationUtilsIntegrationTest.test staging complete notification(NotificationUtilsIntegrationTest.groovy:53)
Caused by: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /brokers/ids
at org.apache.zookeeper.KeeperException.create(KeeperException.java:111)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1472)
at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1500)
at org.I0Itec.zkclient.ZkConnection.getChildren(ZkConnection.java:99)
at org.I0Itec.zkclient.ZkClient$2.call(ZkClient.java:416)
at org.I0Itec.zkclient.ZkClient$2.call(ZkClient.java:413)
at org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:675)
... 6 more

 

My code:

String topic="mytopic"

int partitions = 2;
int replication = 3;
Properties topicConfig = new Properties();
println("zkUtils is "+topicConfig)
kafka.admin.AdminUtils.createTopic(zkClient, topic, partitions, replication, topicConfig);

 

Could you please let me know the solution why im getting this error. I'm just stuck from past 2days. Thanks in advance!

Re: KeeperErrorCode = NoNode for /brokers/ids

New Contributor

I also had the same issue on kafka-2.10. but i was created the topic before kafka server starts. I have corrected my flow. Once i started the kafka server and then i have created the topic. It created properly by using the following commad.

./bin/kafka-topics.sh --create --topic test --zookeeper localhost:2181 --partitions 1 --replication-factor 1

Re: KeeperErrorCode = NoNode for /brokers/ids

New Contributor
Yup it worked thanks
Don't have an account?
Coming from Hortonworks? Activate your account here