IM服务器一直报错Connection reset by peer

tianba 2020-1-7 1117

不是在阿里云的ecs上,服务端启动后查看日志一直Connection reset by peer报错,也有MQTT protocol version is not valid的报错

最新回复 (8)
  • x86 2020-1-9
    引用 2
    你好,你用的客户端是什么?
  • tianba 2020-1-10
    引用 3
    是安卓
  • x86 2020-1-10
    引用 4
    1. 代码都是最新的吗?
    2. 是官方App吗?
    3. 请你贴一下Android端和服务端的日志。
  • tianba 2020-1-10
    引用 5
    这是服务端 wildfirechat_messages.log日志
    10/01/2020 00:08:25,417 [nioEventLoopGroup-5-2] WARN  DefaultChannelPipeline 151  - 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.
    java.io.IOException: 连接超时
           at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
           at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
           at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
           at sun.nio.ch.IOUtil.read(IOUtil.java:192)
           at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
           at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
           at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1100)
           at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:372)
           at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123)
           at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
           at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
           at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
           at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
           at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
           at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
           at java.lang.Thread.run(Thread.java:748)
    10/01/2020 00:08:25,417 [nioEventLoopGroup-5-3] WARN  DefaultChannelPipeline 151  - 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.
    java.io.IOException: 连接超时
           at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
           at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
           at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
           at sun.nio.ch.IOUtil.read(IOUtil.java:192)
           at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
           at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
           at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1100)
           at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:372)
           at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123)
           at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
           at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
           at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
           at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
           at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
           at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
           at java.lang.Thread.run(Thread.java:748)
    10/01/2020 01:56:54,264 [nioEventLoopGroup-5-1] WARN  DefaultChannelPipeline 151  - 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.
    java.io.IOException: Connection reset by peer
           at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
           at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
           at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
           at sun.nio.ch.IOUtil.read(IOUtil.java:192)
           at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
           at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
           at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1100)
           at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:372)
           at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123)
           at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
           at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
           at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
           at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
           at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
           at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
           at java.lang.Thread.run(Thread.java:748)
    10/01/2020 03:08:41,893 [nioEventLoopGroup-5-4] WARN  DefaultChannelPipeline 151  - 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.
    java.lang.NullPointerException
           at com.xiaoleilu.loServer.handler.IMActionHandler.isValidePath(IMActionHandler.java:40)
           at com.xiaoleilu.loServer.handler.ActionHandler.doAction(ActionHandler.java:118)
           at com.xiaoleilu.loServer.handler.ActionHandler.channelRead0(ActionHandler.java:51)
           at com.xiaoleilu.loServer.handler.ActionHandler.channelRead0(ActionHandler.java:30)
           at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
           at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
           at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
           at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
           at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
           at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
           at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
           at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
           at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
           at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
           at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
           at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
           at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
           at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
           at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
           at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
           at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
           at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
           at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
           at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
           at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
           at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
           at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
           at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
           at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
           at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
           at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
           at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
           at java.lang.Thread.run(Thread.java:748)
  • x86 2020-1-10
    引用 6
    Android端的呢?
  • xiabo 2020-1-10
    引用 7
    我服务端日志也会抛出这个错误
  • tianba 2020-1-10
    引用 8

    Android端目前不清楚,是另外一个同事编译的,这个是手机推送的功能吗,好像不影响正常的聊天呢

  • HeavyRain 2020-1-11
    引用 9
    正常,如果客户端进程突然被操作系统冻结,服务器tcp链接就会报这个错误,请忽略这个错误
返回