小编Az.*_*aYo的帖子

如何捕获java.io.IOException:已建立的连接被主机中的软件中止?

我调试了这个异常,我观察到当用户向服务器发送一些请求并且在服务器响应用户之前,如果用户关闭浏览器窗口或者只是关闭该特定页面,那么就会发生异常.

2015-03-19 12:04:40 DEBUG io:132 - Error reading request
java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
    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:379)
    at org.xnio.nio.NioSocketConduit.read(NioSocketConduit.java:282)
    at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
    at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:130)
    at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:108)
    at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:49)
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
    at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
    at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)
    at org.xnio.nio.WorkerThread.run(WorkerThread.java:539) 
Run Code Online (Sandbox Code Playgroud)

请帮助我处理这种类型的异常,因为当此异常发生4到5次时,服务器进入无响应状态.

我的环境是:Application Server:WildFly 8.2.0.Final Java Version:8 JSF Version:2.2

java-ee connection-reset wildfly-8

5
推荐指数
0
解决办法
1001
查看次数

标签 统计

connection-reset ×1

java-ee ×1

wildfly-8 ×1