IM服务器频繁报错Connection reset by peer

borened 6月前 231

有看到之前的一些帖子也是抛出了连接重置问题,我的疑问是为什么这里日志输出提示在ActionHandler这个类,是客户端走的SERVER API接口时网络原因导致的吗?

2023-11-10 09:32:36 
[09:32:36:580] [WARN] - com.xiaoleilu.loServer.handler.ActionHandler.exceptionCaught(ActionHandler.java:73) - Connection reset by peer
2023-11-10 09:32:36 
    at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_382]
2023-11-10 09:32:36 
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.68.Final.jar:4.1.68.Final]
2023-11-10 09:32:36 
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.68.Final.jar:4.1.68.Final]
2023-11-10 09:32:36 
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) ~[netty-common-4.1.68.Final.jar:4.1.68.Final]
2023-11-10 09:32:36 
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) ~[netty-transport-4.1.68.Final.jar:4.1.68.Final]
2023-11-10 09:32:36 
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) ~[netty-transport-4.1.68.Final.jar:4.1.68.Final]
2023-11-10 09:32:36 
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) ~[netty-transport-4.1.68.Final.jar:4.1.68.Final]
2023-11-10 09:32:36 
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) ~[netty-transport-4.1.68.Final.jar:4.1.68.Final]
2023-11-10 09:32:36 
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) ~[netty-transport-4.1.68.Final.jar:4.1.68.Final]
2023-11-10 09:32:36 
    at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350) ~[netty-transport-4.1.68.Final.jar:4.1.68.Final]
2023-11-10 09:32:36 
    at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) ~[netty-buffer-4.1.68.Final.jar:4.1.68.Final]
2023-11-10 09:32:36 
    at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253) ~[netty-buffer-4.1.68.Final.jar:4.1.68.Final]
2023-11-10 09:32:36 
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379) ~[?:1.8.0_382]
2023-11-10 09:32:36 
    at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[?:1.8.0_382]
2023-11-10 09:32:36 
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[?:1.8.0_382]
2023-11-10 09:32:36 
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[?:1.8.0_382]
2023-11-10 09:32:36 
    at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[?:1.8.0_382]
2023-11-10 09:32:36 
java.io.IOException: Connection reset by peer
2023-11-10 09:32:36 
[09:32:36:580] [WARN] - io.netty.channel.DefaultChannelPipeline.onUnhandledInboundException(DefaultChannelPipeline.java:1152) - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
最新回复 (6)
  • borened 6月前
    引用 2
    日志输出频率在一秒一次
  • x86 6月前
    引用 3
    还有其他信息吗?没见过这个错误,server api 的话也不可能这么高频率的出现这个报错。
  • borened 6月前
    引用 4
    x86 还有其他信息吗?没见过这个错误,server api 的话也不可能这么高频率的出现这个报错。
    我给你贴个wildfirechat-error.log
  • borened 6月前
    引用 5
    x86 还有其他信息吗?没见过这个错误,server api 的话也不可能这么高频率的出现这个报错。
    2023-11-09 18:00:00,012 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:113) - An unexpected exception was caught while processing MQTT message. Closing Netty channel. CId=f3009c59-5589-4246-9b11-299436cf140c1698670226688, cause=null, errorMessage=Connection reset by peer
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.FileDispatcherImpl.read0(Native Method)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.IOUtil.read(IOUtil.java:192)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    2023-11-09 18:00:00,017 ERROR [nioEventLoopGroup-3-1] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - java.lang.Thread.run(Thread.java:750)
    2023-11-09 18:00:00,113 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:113) - An unexpected exception was caught while processing MQTT message. Closing Netty channel. CId=84d8b11d-fbc5-4cc1-ba4e-38ad7e8c915e1695608173739, cause=null, errorMessage=Connection reset by peer
    2023-11-09 18:00:00,113 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.FileDispatcherImpl.read0(Native Method)
    2023-11-09 18:00:00,113 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
    2023-11-09 18:00:00,113 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
    2023-11-09 18:00:00,113 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.IOUtil.read(IOUtil.java:192)
    2023-11-09 18:00:00,113 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
    2023-11-09 18:00:00,113 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253)
    2023-11-09 18:00:00,113 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
    2023-11-09 18:00:00,113 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
    2023-11-09 18:00:00,113 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
    2023-11-09 18:00:00,113 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
    2023-11-09 18:00:00,113 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
    2023-11-09 18:00:00,113 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
    2023-11-09 18:00:00,113 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
    2023-11-09 18:00:00,114 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
    2023-11-09 18:00:00,114 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    2023-11-09 18:00:00,114 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    2023-11-09 18:00:00,114 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - java.lang.Thread.run(Thread.java:750)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:113) - An unexpected exception was caught while processing MQTT message. Closing Netty channel. CId=null, cause=null, errorMessage=Connection reset by peer
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.FileDispatcherImpl.read0(Native Method)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.IOUtil.read(IOUtil.java:192)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    2023-11-09 18:00:00,411 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    2023-11-09 18:00:00,412 ERROR [nioEventLoopGroup-3-2] netty.NettyMQTTHandler (NettyMQTTHandler.java:116) - java.lang.Thread.run(Thread.java:750)
    2023-11-09 18:00:00,571 ERROR [nioEventLoopGroup-3-4] netty.NettyMQTTHandler (NettyMQTTHandler.java:113) - An unexpected exception was caught while processing MQTT message. Closing Netty channel. CId=cded0c99-4b9d-4e3e-a2e9-28a8a67698131695556301020, cause=null, errorMessage=Connection reset by peer
  • borened 6月前
    引用 6
    x86 还有其他信息吗?没见过这个错误,server api 的话也不可能这么高频率的出现这个报错。
    这是什么情况。目前正常IM连接没有受到影响。但是这个报错频率应该是哪里配置不正常把。
  • HeavyRain 6月前
    引用 7
    是不是有ng之类的,有定期活跃检查。你也可以抓包看看请求来源来自哪里
返回