You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by "Yu, Libo " <li...@citi.com> on 2013/05/09 23:38:15 UTC

bug report

Hi,

I created a volume and mounted it to /data/kafka.
There is a lost+found/ dir in it. This crashed the server.
[2013-05-09 16:58:53,607] INFO Loading log 'lost+found' (kafka.log.LogManager)
[2013-05-09 16:58:53,609] FATAL Fatal error during KafkaServerStable startup. Pre
pare to shutdown (kafka.server.KafkaServerStartable)
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1911)
        at kafka.log.LogManager.kafka$log$LogManager$$parseTopicPartitionName(Log
Manager.scala:321)
        at kafka.log.LogManager$$anonfun$loadLogs$1$$anonfun$apply$3.apply(LogMan
ager.scala:115)
        at kafka.log.LogManager$$anonfun$loadLogs$1$$anonfun$apply$3.apply(LogMan
ager.scala:112)
        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:112)
        at kafka.log.LogManager$$anonfun$loadLogs$1.apply(LogManager.scala:104)
        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:104)
        at kafka.log.LogManager.<init>(LogManager.scala:56)
        at kafka.server.KafkaServer.createLogManager(KafkaServer.scala:181)
        at kafka.server.KafkaServer.startup(KafkaServer.scala:67)

It is from functions
  /**
   * Parse the topic and partition out of the directory name of a log
   */
  private def parseTopicPartitionName(name: String): TopicAndPartition = {
    val index = name.lastIndexOf('-')
    TopicAndPartition(name.substring(0,index), name.substring(index+1).toInt)
  }

Basically, you cannot assume everything in the log directory is log files.

Regards,

Libo