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

vatsal mevada picture vatsal mevada · Jun 13, 2017 · Viewed 13.6k times · Source

We have encountered few exception on production environment:

UnknownTopicOrPartitionException: This server does not host this topic-partition

As per my analysis, one possible workaround for this issue is increasing no of retries since this is a retriable exception.

I am facing some difficulties which reproducing this issue locally. I tried bringing down broker while producing but it is failing with TimeoutException.

I am looking for suggestions to reproduce this issue.

Answer

gokhansari picture gokhansari · Feb 1, 2019

If you get this error log during topic creation process, there is an open issue for this:

KAFKA-6221 ReplicaFetcherThread throws UnknownTopicOrPartitionException on topic creation

at some point of time during batch creating topics, it's likely that UpdateMetadata requests got processed later than FetchRequest, therefore metadata cache was not updated on a timely basis.

issue was about log messages that have no impact on cluster health.