java.io.IOException已建立的连接已被主机中的软件中止

时间:2015-07-08 20:38:36

标签: java servlets tomcat8

当我对远程服务器进行一次servlet调用时,我经常收到此错误。

运行java application1,用少量数据调用servlet调用application2。应用程序2必须返回一些数据。但经常我在application2中得到低于错误,而返回响应为ObjectOutputStream,有时它工作正常。我正在使用tomcat 8。

org.apache.catalina.connector.ClientAbortException: java.io.IOException: An established connection was aborted by the software in your host machine
15:45:44:776 PM     at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
15:45:44:776 PM     at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
15:45:44:776 PM     at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
15:45:44:776 PM     at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
15:45:44:776 PM     at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
15:45:44:776 PM     at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
15:45:44:776 PM     at java.io.ObjectOutputStream$BlockDataOutputStream.drain(Unknown Source)
15:45:44:776 PM     at java.io.ObjectOutputStream$BlockDataOutputStream.writeByte(Unknown Source)
15:45:44:776 PM     at java.io.ObjectOutputStream.writeFatalException(Unknown Source)
15:45:44:776 PM     at java.io.ObjectOutputStream.writeObject(Unknown Source)
15:45:44:776 PM     at com.me.opmanager.extranet.remote.communication.fw.fe.RegionalListener.doPost(RegionalListener.java:87)
15:45:44:776 PM     at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
15:45:44:776 PM     at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
15:45:44:776 PM     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
15:45:44:776 PM     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:45:44:776 PM     at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
15:45:44:776 PM     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
15:45:44:776 PM     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:45:44:776 PM     at com.adventnet.netflow.filters.NFACredentialFilter.doFilter(NFACredentialFilter.java:29)
15:45:44:776 PM     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
15:45:44:776 PM     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:45:44:776 PM     at com.adventnet.authentication.filter.AssociateCredential.doFilter(AssociateCredential.java:43)
15:45:44:776 PM     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
15:45:44:776 PM     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:45:44:776 PM     at com.adventnet.nms.webclient.login.NTLMV2CredentialAssociationFilter.doFilter(NTLMV2CredentialAssociationFilter.java:37)
15:45:44:776 PM     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
15:45:44:776 PM     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:45:44:776 PM     at com.adventnet.nms.webclient.login.NTLMV2Filter.doFilter(NTLMV2Filter.java:108)
15:45:44:776 PM     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
15:45:44:776 PM     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:45:44:776 PM     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
15:45:44:776 PM     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
15:45:44:776 PM     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
15:45:44:776 PM     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
15:45:44:776 PM     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
15:45:44:776 PM     at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
15:45:44:776 PM     at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:240)
15:45:44:776 PM     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
15:45:44:776 PM     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)
15:45:44:776 PM     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)
15:45:44:776 PM     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)
15:45:44:776 PM     at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
15:45:44:776 PM     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)
15:45:44:776 PM     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)
15:45:44:776 PM     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
15:45:44:776 PM     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
15:45:44:776 PM     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
15:45:44:776 PM     at java.lang.Thread.run(Unknown Source)
15:45:44:776 PM Caused by: java.io.IOException: An established connection was aborted by the software in your host machine
15:45:44:776 PM     at sun.nio.ch.SocketDispatcher.write0(Native Method)
15:45:44:776 PM     at sun.nio.ch.SocketDispatcher.write(Unknown Source)
15:45:44:776 PM     at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
15:45:44:776 PM     at sun.nio.ch.IOUtil.write(Unknown Source)
15:45:44:776 PM     at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
15:45:44:776 PM     at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:127)
15:45:44:776 PM     at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
15:45:44:776 PM     at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:173)
15:45:44:776 PM     at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
15:45:44:776 PM     at org.apache.coyote.http11.InternalNioOutputBuffer.flushBuffer(InternalNioOutputBuffer.java:244)
15:45:44:776 PM     at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:189)
15:45:44:776 PM     at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
15:45:44:776 PM     at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
15:45:44:776 PM     at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:116)
15:45:44:776 PM     at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
15:45:44:776 PM     at org.apache.coyote.Response.doWrite(Response.java:503)
15:45:44:776 PM     at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
15:45:44:776 PM     ... 47 more

2 个答案:

答案 0 :(得分:0)

问题似乎出现在运行'application2'的服务器上。

我能想到的最好的原因是防火墙/防病毒软件(暂时禁用测试)正在干扰。

某些搜索似乎建议绑定到端口的多个应用程序(特别是两个IDE),检查您的进程和/或重新启动服务器(Web服务器或主机)。但是我不确定除非他们使用UDP而不是TCP,否则这是可能的。

答案 1 :(得分:0)

评论:

由于“经常”,我假设“不是经常”,因此“有时有效”。

答案:

您的问题可以在“附近”定位:

com.me.opmanager.extranet.remote.communication.fw.fe.RegionalListener
   .doPost(RegionalListener.java:87)

..这绝对与IO相关!我担心3.5年后这不会有太大帮助

似乎此类属于OP manager