Support Questions

Find answers, ask questions, and share your expertise

how to add broker id manually to zookeeper cli

avatar

we have kafka cluster with 3 brokers machines and 3 zookeeper servers machines

all servers are installed on redhat 7.2 version

but when we run the following cli ( to know that all brokers ids are exist in zookeeper , we get:

 

zookeeper-shell.sh zoo_server:2181 <<< "ls /brokers/ids"

WATCHER::

WatchedEvent state:SyncConnected type:None path:null
[3, 2]


instead to get that:
[3, 2 , 1]

we checked the first broker ( kafka01 ) by searching errors in server.log

And we not see any related error in the log!

port 2181 from kafka broker to zookeeper machine is working

we also restart kafka01 , but this not help to get the broker id in zookeeper cli

we try also to restart all zookeeper servers ( there are 3 ) , and then again to restart kafka01 , but still without results

so any suggestion to this behavior?

can we add the missing broker to zookeeper cli ? , if yes then how?

 

 

note - I see another thread - https://community.cloudera.com/t5/Support-Questions/Specified-config-does-not-exist-in-ZooKeeper/td-...

but no info about how to add id to zookeeper

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Expert Contributor

@mike_bronson7 can you check if the meta.properties file usually located under /kafka-logs has the right value? this should contain broker.id=1

 

We can't add ids manually to zookeeper, these are ephemeral nodes and they're created every time that a broker registers itself in zookeeper.

 

Can you provide the startup lines from the server.log?

 

Thanks.

View solution in original post

2 REPLIES 2

avatar
Expert Contributor

@mike_bronson7 can you check if the meta.properties file usually located under /kafka-logs has the right value? this should contain broker.id=1

 

We can't add ids manually to zookeeper, these are ephemeral nodes and they're created every time that a broker registers itself in zookeeper.

 

Can you provide the startup lines from the server.log?

 

Thanks.

avatar
New Contributor

Out of all the options available to deal with this situation, I think resetting your network configurations is the best. Resetting your network configurations is one of the maintenance procedures that help refresh or repair your network connectivity. In this way, it could eliminate latency and will return your network status like when you started using the Internet. To resolve your concern, we suggest that you reset your TCP/IP or Internet Protocol to its default settings. It's like using the services of Mortgage Advisor London when looking to buy a house, in the sense that it is the best choice you can make.