kafka的producer发送消息异常

bolean 发布于 2016/09/05 18:18
阅读 1K+
收藏 0

kafka的producer端,可以正常运行,如下

运行一段时间后,突然异常,异常代码如下

2016-09-05 16:57:54|WARN kafka.utils.Logging$class.warn(Logging.scala:89) [1535193] Failed to send producer request with correlation id 5 to broker 0 with data for partitions [proLogsAio03MxqP,0]
java.nio.channels.ClosedChannelException
	at kafka.network.BlockingChannel.send(BlockingChannel.scala:110)
	at kafka.producer.SyncProducer.liftedTree1$1(SyncProducer.scala:75)
	at kafka.producer.SyncProducer.kafka$producer$SyncProducer$$doSend(SyncProducer.scala:74)
	at kafka.producer.SyncProducer$$anonfun$send$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(SyncProducer.scala:105)
	at kafka.producer.SyncProducer$$anonfun$send$1$$anonfun$apply$mcV$sp$1.apply(SyncProducer.scala:105)
	at kafka.producer.SyncProducer$$anonfun$send$1$$anonfun$apply$mcV$sp$1.apply(SyncProducer.scala:105)
	at kafka.metrics.KafkaTimer.time(KafkaTimer.scala:33)
	at kafka.producer.SyncProducer$$anonfun$send$1.apply$mcV$sp(SyncProducer.scala:104)
	at kafka.producer.SyncProducer$$anonfun$send$1.apply(SyncProducer.scala:104)
	at kafka.producer.SyncProducer$$anonfun$send$1.apply(SyncProducer.scala:104)
	at kafka.metrics.KafkaTimer.time(KafkaTimer.scala:33)
	at kafka.producer.SyncProducer.send(SyncProducer.scala:103)
	at kafka.producer.async.DefaultEventHandler.kafka$producer$async$DefaultEventHandler$$send(DefaultEventHandler.scala:257)
	at kafka.producer.async.DefaultEventHandler$$anonfun$dispatchSerializedData$2.apply(DefaultEventHandler.scala:108)
	at kafka.producer.async.DefaultEventHandler$$anonfun$dispatchSerializedData$2.apply(DefaultEventHandler.scala:100)
	at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772)
	at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:98)
	at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:98)
	at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:226)
	at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:39)
	at scala.collection.mutable.HashMap.foreach(HashMap.scala:98)
	at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771)
	at kafka.producer.async.DefaultEventHandler.dispatchSerializedData(DefaultEventHandler.scala:100)
	at kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:73)
	at kafka.producer.Producer.send(Producer.scala:77)
	at kafka.javaapi.producer.Producer.send(Producer.scala:33)
	at com.jf.doris.handler.ReaderLogToKafka.pushLogKafka(ReaderLogToKafka.java:112)
	at com.jf.doris.handler.ReaderLogToKafka.doHandler(ReaderLogToKafka.java:55)
	at com.jf.doris.DorisToolsApp.main(DorisToolsApp.java:35)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)
	at java.lang.Thread.run(Thread.java:745)



求解决方案....

加载中
0
雨季之下
雨季之下
Spark+Kafka实时流机器学习实战
课程观看地址:http://www.xuetuwuyou.com/course/147

课程出自学途无忧网:http://www.xuetuwuyou.com

《深入浅出Spark机器学习实战(用户行为分析)》
课程观看地址:http://www.xuetuwuyou.com/course/144

返回顶部
顶部