You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by "Srinivas, Kaushik (Nokia - IN/Bangalore)" <ka...@nokia.com> on 2018/05/28 10:35:20 UTC

UnknownTopicOrPartitionException & NotLeaderForPartitionException upon replication of topics.

Hi Team,



Running kafka & zookeeper in kubernetes cluster.

No of brokers : 3

No of partitions per topic : 3

creating topic with 3 partitions, and looks like all the partitions are up.

Below is the snapshot to confirm the same,

Topic:applestore  PartitionCount:3      ReplicationFactor:3   Configs:
Topic: applestore      Partition: 0    Leader: 1001    Replicas: 1001,1003,1002        Isr: 1001,1003,1002
Topic: applestore      Partition: 1    Leader: 1002    Replicas: 1002,1001,1003        Isr: 1002,1001,1003
Topic: applestore      Partition: 2    Leader: 1003    Replicas: 1003,1002,1001        Isr: 1003,1002,1001

But, we see in the brokers as soon as the topics are created below stack traces appears,

error 1:
[2018-05-28 08:00:31,875] ERROR [ReplicaFetcher replicaId=1001, leaderId=1003, fetcherId=7] Error for partition applestore-2 to broker 1003:org.apache.kafka.common.errors.UnknownTopicOrPartitionException: This server does not host this topic-partition. (kafka.server.ReplicaFetcherThread)

error 2 :
[2018-05-28 00:43:20,993] ERROR [ReplicaFetcher replicaId=1003, leaderId=1001, fetcherId=0] Error for partition apple-6 to broker 1001:org.apache.kafka.common.errors.NotLeaderForPartitionException: This server is not the leader for that topic-partition. (kafka.server.ReplicaFetcherThread)

When we tries producing records to each specific partition, it works fine and also log size across the replicated brokers appears to be equal, which means replication is happening fine.
Attaching the two stack trace files.

Why are these stack traces appearing ? can we ignore these stack traces if its some spam messages ?

Best regards,
kaushik