dataengref errors

Home / Kafka / Brokers and partitions

Kafka: UnknownTopicOrPartitionException: This server does not host this topic-partition

org.apache.kafka.common.errors.UnknownTopicOrPartitionExceptionThis server does not host this topic-partition.

The broker that received the request has no replica of the partition. Right after a topic is created or deleted this is temporary; if it persists, the topic does not exist or the client is using stale metadata.

Causes · Fixes · Source

Common causes

  1. The topic was just created and metadata has not propagated yet.How to confirm: The warning stops after a few seconds.
  2. The topic does not exist, or was deleted while clients still use it.How to confirm: kafka-topics --list does not show the topic.
  3. The client requests a partition number higher than the topic has.How to confirm: A custom partitioner or a hard-coded partition number exceeds the partition count.

How to fix it

Create the topic with the expected partition count, and check custom partitioners against the real number of partitions.

Where the message comes from

References

Related errors

Last checked: