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

Get java.lang.NoSuchMethodError: com.yammer.metrics.core.TimerContext.stop()J when stopping kafka brokers

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.0
    • Component/s: config
    • Labels:
      None
    • Environment:
      MAC OSX 10.8.3

      Description

      When stopping kafka brokers I get the following stack trace:

      2013-04-26 14:30:16,394] INFO [Replica Manager on Broker 1]: Shutted down completely (kafka.server.ReplicaManager)
      [2013-04-26 14:30:16,398] WARN com.yammer.metrics.core.TimerContext.stop()J (kafka.utils.Utils$)
      java.lang.NoSuchMethodError: com.yammer.metrics.core.TimerContext.stop()J
      at kafka.metrics.KafkaTimer.time(KafkaTimer.scala:36)
      at kafka.log.FileMessageSet.flush(FileMessageSet.scala:164)
      at kafka.log.FileMessageSet.close(FileMessageSet.scala:173)
      at kafka.log.LogSegment$$anonfun$close$2.apply$mcV$sp(LogSegment.scala:161)
      at kafka.utils.Utils$.swallow(Utils.scala:186)
      at kafka.utils.Logging$class.swallowWarn(Logging.scala:91)
      at kafka.utils.Utils$.swallowWarn(Utils.scala:45)
      at kafka.utils.Logging$class.swallow(Logging.scala:93)
      at kafka.utils.Utils$.swallow(Utils.scala:45)
      at kafka.log.LogSegment.close(LogSegment.scala:161)
      at kafka.log.Log$$anonfun$close$2.apply(Log.scala:248)
      at kafka.log.Log$$anonfun$close$2.apply(Log.scala:247)
      at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
      at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:34)
      at kafka.log.Log.close(Log.scala:247)
      at kafka.log.LogManager$$anonfun$shutdown$2.apply(LogManager.scala:290)
      at kafka.log.LogManager$$anonfun$shutdown$2.apply(LogManager.scala:290)
      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.LogManager.shutdown(LogManager.scala:290)
      at kafka.server.KafkaServer$$anonfun$shutdown$7.apply$mcV$sp(KafkaServer.scala:125)
      at kafka.utils.Utils$.swallow(Utils.scala:186)
      at kafka.utils.Logging$class.swallowWarn(Logging.scala:91)
      at kafka.utils.Utils$.swallowWarn(Utils.scala:45)
      at kafka.utils.Logging$class.swallow(Logging.scala:93)
      at kafka.utils.Utils$.swallow(Utils.scala:45)
      at kafka.server.KafkaServer.shutdown(KafkaServer.scala:125)
      at kafka.server.KafkaServerStartable.shutdown(KafkaServerStartable.scala:46)
      at kafka.Kafka$$anon$1.run(Kafka.scala:42)

      Steps to reproduce:
      git checkout remotes/origin/0.8
      ./sbt update
      ./sbt +package
      ./sbt assembly-package-dependency
      ./sbt eclipse

      Now create 3 server.properties under config as described in the quick-start for 0.8
      Additionally comment out the JMX_PORT in bin/kafka-server-start.sh.
      Now start up servers and create a topic

      bin/zookeeper-server-start.sh config/zookeeper.properties&
      bin/kafka-server-start.sh config/server0.properties&
      bin/kafka-server-start.sh config/server1.properties&
      bin/kafka-server-start.sh config/server2.properties&
      bin/kafka-create-topic.sh --topic mytopic --replica 3 --zookeeper localhost:2181
      bin/kafka-console-producer.sh --broker-list localhost:9092,localhost:9093,localhost:9094 --sync --topic mytopic

      Confirm that kafka servers are running as well as QuorumPeerMain
      $ jps
      43668 QuorumPeerMain
      43669 Jps
      43666 Kafka
      43667 Kafka
      43665 Kafka

      Now stop the brokers and zookeeper
      kill $(ps -eaf|grep Kafka|grep -v grep|awk '

      {print $2}')
      kill $(ps -eaf|grep QuorumPeerMain|grep -v grep|awk '{print $2}

      ')

      You should see the above stack trace.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kkasravi Kam Kasravi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: