Created 03-20-2016 07:47 AM
I am getting this error for few topics
WARN Error while fetching metadata with correlation id 4802 : {next=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
WARN Error while fetching metadata with correlation id 4803 : {next=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
I am using Kafka 0.9.0.0 and getting this error for few topics while trying to produce messages. After googling I got answers to delete those topics and to recreate.
But I can’t take that option since I would like to have the data and the state of available.
The topics which I was trying are already existing
and worked before.
When I try to list topics and try to get topic information I was able to
get all the details including leader selected.
But if I try to produce I am getting this problem. And this happened to
few topics and most of the topics in the same cluster are working properly.
We got this problem in our integration environment. We are very close to moving to production. It would be great if someone can help to understand this problem better.
Created 03-23-2016 06:03 AM
@Mohamed Ashiq, If your topics look like above (old ones refer to brokers 0,1,2,... and new ones to 1001, 1002, ...) then the solution is to visit meta.properties files on each disk of each broker and edit "broker.id" property, changing it from 1001, 1002, ... to 0, 1, 2, ...
Created 03-21-2016 01:50 PM
I'm having the same issue, after Kafka upgrade from 0.8.1 to 0.9.0. Everything works against newly created topics, but not against old ones. I checked the details and found that IDs are now numbered from 1001, while before they were starting from 0. For example:
$ ./kafka-topics.sh --zookeeper zk1.example.com:2181 --describe --topic k81c Topic:k81c PartitionCount:2 ReplicationFactor:2 Configs: Topic: k81c Partition: 0 Leader: 0 Replicas: 0,1 Isr: 0 Topic: k81c Partition: 1 Leader: 0 Replicas: 1,0 Isr: 0 $ ./kafka-topics.sh --zookeeper zk1.example.com:2181 --describe --topic k9a Topic:k9a PartitionCount:2 ReplicationFactor:1 Configs: Topic: k9a Partition: 0 Leader: 1002 Replicas: 1002 Isr: 1002 Topic: k9a Partition: 1 Leader: 1001 Replicas: 1001 Isr: 1001
I also checked ZK's entries for /topics/ids, there are (in my case, with 2 brokers) only 2 of them for 1001 and 1002.
Created 03-23-2016 06:03 AM
@Mohamed Ashiq, If your topics look like above (old ones refer to brokers 0,1,2,... and new ones to 1001, 1002, ...) then the solution is to visit meta.properties files on each disk of each broker and edit "broker.id" property, changing it from 1001, 1002, ... to 0, 1, 2, ...
Created 02-27-2017 05:29 AM
Hi,@Mohamed Ashiq
I have the same question, may I ask you to solve this problem? Thank you!