Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-6973

setting invalid timestamp causes Kafka broker restart to fail

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 2.0.0
    • Component/s: admin
    • Labels:
      None

      Description

      Setting timestamp to invalid value causes Kafka broker to fail upon startup. E.g.

      ./kafka-topics.sh --create --zookeeper localhost --topic duck3 --partitions 1 --replication-factor 1 --config message.timestamp.type=boom

       

      Also note that the docs says the parameter name is log.message.timestamp.type, but this is silently ignored.

      This works with no error for the invalid timestamp value. But next time you restart Kafka:

       

      [2018-05-29 13:09:05,806] FATAL [KafkaServer id=0] Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)

      java.util.NoSuchElementException: Invalid timestamp type boom

      at org.apache.kafka.common.record.TimestampType.forName(TimestampType.java:39)

      at kafka.log.LogConfig.<init>(LogConfig.scala:94)

      at kafka.log.LogConfig$.fromProps(LogConfig.scala:279)

      at kafka.log.LogManager$$anonfun$17.apply(LogManager.scala:786)

      at kafka.log.LogManager$$anonfun$17.apply(LogManager.scala:785)

      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)

      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)

      at scala.collection.immutable.HashMap$HashMap1.foreach(HashMap.scala:221)

      at scala.collection.immutable.HashMap$HashTrieMap.foreach(HashMap.scala:428)

      at scala.collection.immutable.HashMap$HashTrieMap.foreach(HashMap.scala:428)

      at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)

      at scala.collection.AbstractTraversable.map(Traversable.scala:104)

      at kafka.log.LogManager$.apply(LogManager.scala:785)

      at kafka.server.KafkaServer.startup(KafkaServer.scala:222)

      at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)

      at kafka.Kafka$.main(Kafka.scala:92)

      at kafka.Kafka.main(Kafka.scala)

      [2018-05-29 13:09:05,811] INFO [KafkaServer id=0] shutting down

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                huxi_2b huxihx
                Reporter:
                brebs Paul Brebner
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: