Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 275
vatsal mevada Avatar asked Jun 13 '17 07:06

vatsal mevada


1 Answers

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.

like image 81
gokhansari Avatar answered Oct 18 '22 03:10

gokhansari