kafka异常connection reset by peer

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/wenxuechaozhe/article/details/52664774

最近查阅kafka对应的系统log文件server.log,查阅到一条异常信息

ERROR Closing socket for /120.24.169.139 because of error (kafka.network.Processor)  Connection reset by peer

异常信息:

[2016-09-22 13:17:52,804] ERROR Closing socket for /120.24.169.139 because of error (kafka.network.Processor)  
java.io.IOException: Connection reset by peer  
        at sun.nio.ch.FileDispatcher.read0(Native Method)  
        at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)  
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:198)  
        at sun.nio.ch.IOUtil.read(IOUtil.java:171)  
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:245)  
        at kafka.utils.Utils$.read(Utils.scala:375)  
        at kafka.network.BoundedByteBufferReceive.readFrom(BoundedByteBufferReceive.scala:54)  
        at kafka.network.Processor.read(SocketServer.scala:347)  
        at kafka.network.Processor.run(SocketServer.scala:245)  
        at java.lang.Thread.run(Thread.java:662) 

原因:

该异常主要是因为kafka的客户端异常关闭,而服务端仍然向目标端推送数据而造成的错误信息。

解决方法:

若由于某种原因需要关闭,先关闭服务端,再关闭客户端即可。


展开阅读全文

没有更多推荐了,返回首页