[ https://issues.apache.org/jira/browse/KAFKA-8173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16825808#comment-16825808 ]
Arpit Khare commented on KAFKA-8173: ------------------------------------ [~regexcracker] This issue occurs because of corrupt index files, which is a result of unclean shutdown of the Brokers. To solve this issue, please take the backup of the index files mentioned in the error log. Then remove the index file manually from the Kafka logs.dir directory. Finally, restart the Kafka broker. The index file will be recreated on broker restart. > Kafka Errors after version upgrade from 0.10.2.2 to 2.1.1 > ---------------------------------------------------------- > > Key: KAFKA-8173 > URL: https://issues.apache.org/jira/browse/KAFKA-8173 > Project: Kafka > Issue Type: Improvement > Components: offset manager > Reporter: Amit Anand > Priority: Major > > After Kafka version upgrade from 0.10.2.2 to 2.1.1 Warnings starts coming for > all the topics "due to Corrupt time index found, time index file". > {code:java} > [2019-03-28 17:23:55.877+0000] WARN [Log partition=FirstTopic-6, > dir=/apps/kafka/data] Found a corrupted index file corresponding to log file > /apps/kafka/data/FirstTopic-6/00000000000000000494.log due to Corrupt time > index found, time index file > (/apps/kafka/data/FirstTopic-6/00000000000000000494.timeindex) has non-zero > size but the last timestamp is 0 which is less than the first timestamp > 1553720469480}, recovering segment and rebuilding index files... > (kafka.log.Log) }} > {{[2019-03-28 17:23:55.877+0000] WARN [Log partition=NewTopic-3, > dir=/apps/kafka/data] Found a corrupted index file corresponding to log file > /apps/kafka/data/NewTopic-3/00000000000000000494.log due to Corrupt time > index found, time index file > (/apps/kafka/data/NewTopic-3/00000000000000000494.timeindex) has non-zero > size but the last timestamp is 0 which is less than the first timestamp > 1553720469480}, recovering segment and rebuilding index files... > (kafka.log.Log) [2019-03-28 17:23:55.877+0000] WARN [Log > partition=SecondTopic-3, dir=/apps/kafka/data] Found a corrupted index file > corresponding to log file > /apps/kafka/data/SecondTopic-3/00000000000000000494.log due to Corrupt time > index found, time index file > (/apps/kafka/data/SecondTopic-3/00000000000000000494.timeindex) has non-zero > size but the last timestamp is 0 which is less than the first timestamp > 1553720469480}, recovering segment and rebuilding index files... > (kafka.log.Log) > > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)