[ https://issues.apache.org/jira/browse/KAFKA-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13505437#comment-13505437 ]
Chris Curtin commented on KAFKA-635: ------------------------------------ Probably not DEBUG but that is where I started when researching the issue. I think a different way to look at the problem is the errors that are preventing a connection to the broker are not recorded with the default logging level so there is no idea what went wrong. Even the exception thrown has no information other than it tried 3 times. > Producer error when trying to send not displayed unless in DEBUG logging level > ------------------------------------------------------------------------------ > > Key: KAFKA-635 > URL: https://issues.apache.org/jira/browse/KAFKA-635 > Project: Kafka > Issue Type: Bug > Affects Versions: 0.8 > Environment: Java client > Reporter: Chris Curtin > Priority: Minor > > 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. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira