Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

kafka + what could be the reasons for kafka broker isn't the leader for topic partition

kafka + what could be the reasons for kafka broker isn't the leader for topic partition

hi all,

we have HDP cluster - 2.6.4 with ambari 2.6.1 version

we have 3 kafka brokers with version 10.1

we saw in the /var/log/kafka/server.log many errors messages as :

in this example we have 6601 errors lines about - This server is not the leader for that topic-partition

 grep "This server is not the leader for that topic-partition" server.log | wc -l

 6601

example

[2019-01-06 14:56:53,312] ERROR [ReplicaFetcherThread-0-1011], Error for partition [topic1-example,34] to broker 1011:org.apache.kafka.common.errors.NotLeaderForPartitionException: This server is not the leader for that topic-partition. (kafka.server.ReplicaFetcherThread)
Michael-Bronson
2 REPLIES 2
Highlighted

Re: kafka + what could be the reasons for kafka broker isn't the leader for topic partition

Mentor

@ Michael Bronson

Kafka requires the machine's hostname to be resolvable to connect back to itself. If you look under the config files and open up the server.properties you will see this line but most appropriate have localhost because in the event that the IP changes Kafka will still work seamlessly

advertised.host.name=localhost or xx.xx.xx.xxx 

Make sure this IP matches your current IP, you can check for your IP here.

Highlighted

Re: kafka + what could be the reasons for kafka broker isn't the leader for topic partition

@Geoffrey - yes all hosts and IP's have resolving

Michael-Bronson
Don't have an account?
Coming from Hortonworks? Activate your account here