I'm running a java program that uses the kafka library and check the committed offset of a consumer group from zookeeper every 1 sec. the program runs well for about 2 hour and starts throwing RuntimeException:
java.lang.RuntimeException: Error fetching offset data. Reason: 1
at com.pinterest.secor.common.KafkaClient.getMessage(KafkaClient.java:127)
at com.pinterest.secor.common.KafkaClient.getCommittedMessage(KafkaClient.java:186)
...
What is reason 1? I couldn't find any document or pages illustrating the root cause of this situation.
Check this out, this is a code fragment of
kafka.common.ErrorMapping
:As you can see,
1
meansOffsetOutOfRangeCode
.