47
votes

I have written a kafka consumer and producer that worked fine until today. This morning, when I started zookeeper and kafka, my consumer was not able to read messages, and I found this in the zookeeper logs:

INFO Got user-level KeeperException when processing sessionid:0x151c41e62e10000 
     type:create cxid:0x2a zxid:0x1e txntype:-1 reqpath:n/a 
     Error Path:/brokers/ids 
     Error:KeeperErrorCode = NodeExists for /brokers/ids   
     (org.apache.zookeeper.server.PrepRequestProcessor)
4
Looks like you are trying to start another kafka broker with same broker idvasa.v03
Thank you. It's very strange. I follow the same procedure of other times. What thing could' I try to fix the problem?adellarocca
Got the same issue, restarting nodes is ok, Kafka doesn't log anything, only zookeeper is complaining, yet the consumers can't subscribe.Brice
Faced the same issue. Had to clear all logs and zookeeper files to fix this.Rahar
Could you provide your Kafka server version, Zookeeper version, Kafka-client version? Can you also give the topic information and metadata of the given topic/partitions.Irshad P I

4 Answers

4
votes

Look for log.dirs in your server.properties file and delete all the Kafka and zookeeper logs from there and try restarting zookeeper and Kafka respectively. I was facing the same issue and doing this resolved it.

0
votes

According to Confluent at https://groups.google.com/forum/#!topic/confluent-platform/h0gEik_Ii1E on 2016/10/08

Those are not errors, you can see the log level is INFO. It is simply logging that Kafka tried to create a node that already exists. Totally normal behavior for Kafka and nothing to worry about.

Is there an actual problem related to the message or is everything working correctly?

0
votes

go to Kafka root directory and look for the logs file. and clear all logs. For instance: say your kafka is installed in the downloads folder:

cd ~/Downloads/kafka_2.13-2.6.0
rm -rf logs

It will resolve the issue.

-2
votes

I had this error in my Kafka running on Windows 7. I think this exception is not a problem since it's only info level. Just make sure the broker is still running. Even with this error, I could still:

  1. Create and list a topic kafka-topics.bat.
  2. Consume a topic kafka-console-consumer.bat.
  3. Programmatically send a message producer.send(new ProducerRecord<String, String>("topic", "hello")).get().