[ 
https://issues.apache.org/jira/browse/KAFKA-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13856647#comment-13856647
 ] 

Drew Goya commented on KAFKA-1112:
----------------------------------

Commenting here as requested.

After migrating a cluster from 0.8.0 to 0.8.1 (trunk/87efda7) I had a few 
brokers that wouldn't come up.

This is the exception I ran into, I was able to fix it by deleting the 
/data/kafka/logs/Events2-124/ directory.  That directory contained a non zero 
size index file and a zero size log file.  I had a bunch of these directories 
scattered around the cluster.  I suspect they were there from partition 
reassignment failures which happened when the cluster was at 0.8.0.

[2013-12-18 02:40:37,163] FATAL Fatal error during KafkaServerStable startup. 
Prepare to shutdown (kafka.server.KafkaServerStartable)
java.lang.IllegalArgumentException: requirement failed: Corrupt index found, 
index file (/data/kafka/logs/Events2-124/00000000000000000000.index) has 
non-zero size but the last offset is 0 and the base offset is 0
        at scala.Predef$.require(Predef.scala:145)
        at kafka.log.Log$$anonfun$loadSegments$5.apply(Log.scala:160)
        at kafka.log.Log$$anonfun$loadSegments$5.apply(Log.scala:159)
        at scala.collection.Iterator$class.foreach(Iterator.scala:631)
        at 
scala.collection.JavaConversions$JIteratorWrapper.foreach(JavaConversions.scala:474)
        at scala.collection.IterableLike$class.foreach(IterableLike.scala:79)
        at 
scala.collection.JavaConversions$JCollectionWrapper.foreach(JavaConversions.scala:495)
        at kafka.log.Log.loadSegments(Log.scala:159)
        at kafka.log.Log.<init>(Log.scala:64)
        at 
kafka.log.LogManager$$anonfun$loadLogs$1$$anonfun$apply$3.apply(LogManager.scala:120)
        at 
kafka.log.LogManager$$anonfun$loadLogs$1$$anonfun$apply$3.apply(LogManager.scala:115)
        at 
scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
        at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:34)
        at kafka.log.LogManager$$anonfun$loadLogs$1.apply(LogManager.scala:115)
        at kafka.log.LogManager$$anonfun$loadLogs$1.apply(LogManager.scala:107)
        at 
scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
        at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:32)
        at kafka.log.LogManager.loadLogs(LogManager.scala:107)
        at kafka.log.LogManager.<init>(LogManager.scala:59)

> broker can not start itself after kafka is killed with -9
> ---------------------------------------------------------
>
>                 Key: KAFKA-1112
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1112
>             Project: Kafka
>          Issue Type: Bug
>          Components: log
>    Affects Versions: 0.8.0, 0.8.1
>            Reporter: Kane Kim
>            Assignee: Jay Kreps
>            Priority: Critical
>             Fix For: 0.8.1
>
>         Attachments: KAFKA-1112-v1.patch, KAFKA-1112-v2.patch, 
> KAFKA-1112-v3.patch, KAFKA-1112-v4.patch, KAFKA-1112.out
>
>
> When I kill kafka with -9, broker cannot start itself because of corrupted 
> index logs. I think kafka should try to delete/rebuild indexes itself without 
> manual intervention. 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to