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

Producer error when trying to send not displayed unless in DEBUG logging level

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Auto Closed
    • Affects Version/s: 0.8.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Java client

      Description

      When trying to figure out how to connection with 0.8.0 Producer was only seeing exceptions:

      Exception in thread "main" kafka.common.FailedToSendMessageException: Failed to send messages after 3 tries.
      at kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:70)
      at kafka.producer.Producer.send(Producer.scala:75)
      at kafka.javaapi.producer.Producer.send(Producer.scala:32)
      at com.spop.kafka.playproducer.TestProducer.main(TestProducer.java:40)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

      Changing log4j level to DEBUG showed the actual error:

      878 [main] WARN kafka.producer.async.DefaultEventHandler - failed to send to broker 3 with data Map([test1,0] -> ByteBufferMessageSet(MessageAndOffset(Message(magic = 2, attributes = 0, crc = 1906312613, key = null, payload = java.nio.HeapByteBuffer[pos=0 lim=22 cap=22]),0), ))
      java.lang.NoSuchMethodError: com.yammer.metrics.core.TimerContext.stop()J
      at kafka.metrics.KafkaTimer.time(KafkaTimer.scala:36)
      at kafka.producer.SyncProducer.send(SyncProducer.scala:94)
      at kafka.producer.async.DefaultEventHandler.kafka$producer$async$DefaultEventHandler$$send(DefaultEventHandler.scala:221)
      at kafka.producer.async.DefaultEventHandler$$anonfun$dispatchSerializedData$1.apply(DefaultEventHandler.scala:87)
      at kafka.producer.async.DefaultEventHandler$$anonfun$dispatchSerializedData$1.apply(DefaultEventHandler.scala:81)
      at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:80)
      at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:80)
      at scala.collection.Iterator$class.foreach(Iterator.scala:631)
      at scala.collection.mutable.HashTable$$anon$1.foreach(HashTable.scala:161)
      at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:194)
      at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:39)
      at scala.collection.mutable.HashMap.foreach(HashMap.scala:80)
      at kafka.producer.async.DefaultEventHandler.dispatchSerializedData(DefaultEventHandler.scala:81)
      at kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:57)
      at kafka.producer.Producer.send(Producer.scala:75)
      at kafka.javaapi.producer.Producer.send(Producer.scala:32)
      at com.spop.kafka.playproducer.TestProducer.main(TestProducer.java:40)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

      Submitted per Jay's request in a mailing list thread.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              chriscurtin Chris Curtin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: