开发者社区> 问答> 正文

使用CXF3.x出现的报错

10, 2015 3:05:33 上午 org.apache.cxf.transport.http.netty.server.NettyHttpServletHandler exceptionCaught
严重: Unexpected exception from downstream in Netty servlet handler, due to: {0}.
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:446)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:871)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:224)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:108)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:494)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:461)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at java.lang.Thread.run(Unknown Source)

展开
收起
蛮大人123 2016-02-27 17:44:30 3329 0
1 条回答
写回答
取消 提交回答
  • 我说我不帅他们就打我,还说我虚伪

    出现这个问题原因是:
    说明连接被强断了,没有通过协议交互调用close方法。
    客户端自己关闭了连接,(没有调用SocketChannel的close方法。比如一些暴力断开方式,如拔网线,进程直接kill掉,或者windows下ctrl+c。),服务器还在read事件中,这个时候读取客户端的时候会报错。
    我觉得问题已经很清楚了吧?
    Unexpected exception from downstream in Netty servlet handler, due to: {0}
    netty向外发送数据的时候发生了异常。
    应该是启动方式的不对。具体的能把启动的源代码贴出来看一下吗?没有源码怎么知道错误位置呢?

    2019-07-17 18:49:06
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
SPARKLER,A web-crawler on Apache Spark 立即下载
Apache Dubbo3 源码深入解读 立即下载
低代码开发师(初级)实战教程 立即下载