java.io.IOException: Connection closed: Read failed. Possible end of stream encountered

混江龙づ霸主 提交于 2020-04-30 06:55:21

问题


I found some exceptions in the production logs. These occur many times and I don't know what might be the cause. Can anyone give me some tips about this issue? You may have encountered this problem before. I use WebSphere Application Server V8.5.5.7 and MobileFirst Platform Foundation 7.1. I have attached the stack traces below.

 com.ibm.ws.webcontainer.util.ApplicationErrorUtils           E SRVE0777E: Exception thrown by application class 'org.apache.wink.server.internal.RequestProcessor.handleRequest:195'
javax.servlet.ServletException: java.io.IOException: Connection closed: Read failed.  Possible end of stream encountered. 
    at org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:195)
    at org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    at com.worklight.adapters.rest.JAXRSSandbox$2.doFilter(JAXRSSandbox.java:378)
    at com.worklight.adapters.rest.FilterChainImpl.doFilter(FilterChainImpl.java:84)
    at com.worklight.adapters.rest.JAXRSSandbox.handleRequest(JAXRSSandbox.java:383)
    at com.worklight.adapters.rest.RESTAdaptersServiceServlet.doService(RESTAdaptersServiceServlet.java:69)
    at com.worklight.adapters.rest.RESTAdaptersServlet.service(RESTAdaptersServlet.java:59)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1287)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:778)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:150)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:93)
    at com.worklight.analytics.AnalyticsFilter.doFilter(AnalyticsFilter.java:124)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:1020)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1142)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:81)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:928)
    at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:262)
    at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:955)
    at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:341)
    at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:470)
    at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:404)
    at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:284)
    at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:255)
    at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:174)
    at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:83)
    at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504)
    at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574)
    at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:929)
    at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1018)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
    at java.lang.Thread.run(Thread.java:798)
Caused by: java.io.IOException: Connection closed: Read failed.  Possible end of stream encountered. 
    at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:691)
    at com.ibm.ws.tcpchannel.internal.WorkQueueManager.processWork(WorkQueueManager.java:304)
    at com.ibm.ws.tcpchannel.internal.NioTCPReadRequestContextImpl.processSyncReadRequest(NioTCPReadRequestContextImpl.java:79)
    at com.ibm.ws.tcpchannel.internal.TCPReadRequestContextImpl.read(TCPReadRequestContextImpl.java:92)
    at com.ibm.ws.http.channel.internal.HttpServiceContextImpl.fillABuffer(HttpServiceContextImpl.java:4113)
    at com.ibm.ws.http.channel.internal.HttpServiceContextImpl.readSingleBlock(HttpServiceContextImpl.java:3341)
    at com.ibm.ws.http.channel.internal.HttpServiceContextImpl.readBodyBuffer(HttpServiceContextImpl.java:3445)
    at com.ibm.ws.http.channel.internal.inbound.HttpInboundServiceContextImpl.getRequestBodyBuffer(HttpInboundServiceContextImpl.java:1537)
    at com.ibm.ws.http.channel.internal.inbound.HttpInputStreamImpl.checkBuffer(HttpInputStreamImpl.java:101)
    at com.ibm.ws.http.channel.internal.inbound.HttpInputStreamImpl.read(HttpInputStreamImpl.java:181)
    at com.ibm.ws.webcontainer.srt.SRTInputStream.read(SRTInputStream.java:62)
    at org.apache.wink.common.utils.ProviderUtils.copyStream(ProviderUtils.java:215)
    at org.apache.wink.common.utils.ProviderUtils.readFromStream(ProviderUtils.java:192)
    at org.apache.wink.common.utils.ProviderUtils.readFromStreamAsBytes(ProviderUtils.java:197)
    at org.apache.wink.common.internal.providers.entity.StringProvider.readFrom(StringProvider.java:61)
    at org.apache.wink.common.internal.providers.entity.StringProvider.readFrom(StringProvider.java:43)
    at org.apache.wink.server.internal.registry.ServerInjectableFactory$EntityParam.getValue(ServerInjectableFactory.java:200)
    at org.apache.wink.common.internal.registry.InjectableFactory.instantiate(InjectableFactory.java:68)
    at org.apache.wink.server.internal.handlers.CreateInvocationParametersHandler.handleRequest(CreateInvocationParametersHandler.java:44)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
    at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleSubResourceMethod(FindResourceMethodHandler.java:183)
    at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:110)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
    at org.apache.wink.server.internal.handlers.FindRootResourceHandler.handleRequest(FindRootResourceHandler.java:95)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
    at org.apache.wink.server.internal.handlers.HeadMethodHandler.handleRequest(HeadMethodHandler.java:53)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
    at org.apache.wink.server.internal.handlers.OptionsMethodHandler.handleRequest(OptionsMethodHandler.java:46)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
    at org.apache.wink.server.internal.handlers.SearchResultHandler.handleRequest(SearchResultHandler.java:33)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
    at org.apache.wink.server.internal.log.ResourceInvocation.handleRequest(ResourceInvocation.java:92)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
    at org.apache.wink.server.internal.log.Requests.handleRequest(Requests.java:76)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
    at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
    at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
    at org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHandlersChain.java:48)
    at org.apache.wink.server.internal.RequestProcessor.handleRequestWithoutFaultBarrier(RequestProcessor.java:207)
    at org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:154)
com.worklight.core.auth.impl.AuthenticationFilter            E FWLSE0048E: Unhandled exception caught: java.io.IOException: Connection closed: Read failed.  Possible end of stream encountered.
com.ibm.ws.webcontainer.webapp.WebAppErrorReport: java.io.IOException: Connection closed: Read failed.  Possible end of stream encountered.
       at com.ibm.ws.webcontainer.webapp.WebAppErrorReport.constructErrorReport(WebAppErrorReport.java:153)
       at com.ibm.ws.webcontainer.webapp.WebAppErrorReport.constructErrorReport(WebAppErrorReport.java:194)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:849)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:150)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:93)
       at com.worklight.core.auth.impl.AuthenticationFilter$1.execute(AuthenticationFilter.java:224)
       at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:82)
       at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:229)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
       at com.worklight.analytics.AnalyticsFilter.doFilter(AnalyticsFilter.java:124)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
       at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:1020)
       at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1142)
       at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:81)
       at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:928)
       at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:262)
       at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:955)
       at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:341)
       at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:470)
       at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:404)
       at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:284)
       at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:255)
       at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:174)
       at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:83)
       at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504)
       at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574)
       at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:929)
       at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1018)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
       at java.lang.Thread.run(Thread.java:798)
Caused by: java.io.IOException: Connection closed: Read failed.  Possible end of stream encountered.
       at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:691)
       at com.ibm.ws.tcpchannel.internal.WorkQueueManager.processWork(WorkQueueManager.java:304)
       at com.ibm.ws.tcpchannel.internal.NioTCPReadRequestContextImpl.processAsyncReadRequest(NioTCPReadRequestContextImpl.java:134)  ``` 




```  com.worklight.core.auth.impl.AuthenticationFilter            E FWLSE0048E: Unhandled exception caught: java.io.IOException: Connection closed: Read failed.  Possible end of stream encountered.
com.ibm.ws.webcontainer.webapp.WebAppErrorReport: java.io.IOException: Connection closed: Read failed.  Possible end of stream encountered.
       at com.ibm.ws.webcontainer.webapp.WebAppErrorReport.constructErrorReport(WebAppErrorReport.java:153)
       at com.ibm.ws.webcontainer.webapp.WebAppErrorReport.constructErrorReport(WebAppErrorReport.java:194)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:849)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:150)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:93)
       at com.worklight.core.auth.impl.AuthenticationFilter$1.execute(AuthenticationFilter.java:224)
       at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:82)
       at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:229)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
       at com.worklight.analytics.AnalyticsFilter.doFilter(AnalyticsFilter.java:124)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
       at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:1020)
       at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1142)
       at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:81)
       at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:928)
       at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:262)
       at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:955)
       at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:341)
       at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:470)
       at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:404)
       at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:284)
       at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:255)
       at com.ibm.ws.channel.ssl.internal.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1017)
       at com.ibm.ws.channel.ssl.internal.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:626)
       at com.ibm.ws.channel.ssl.internal.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1766)
       at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504)
       at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574)
       at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:929)
       at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1018)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:626)
       at java.lang.Thread.run(Thread.java:780)
Caused by: java.io.IOException: Connection closed: Read failed.  Possible end of stream encountered.
       at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:691)
       at com.ibm.ws.tcpchannel.internal.WorkQueueManager.processWork(WorkQueueManager.java:304)
       at com.ibm.ws.tcpchannel.internal.NioTCPReadRequestContextImpl.processSyncReadRequest(NioTCPReadRequestContextImpl.java:79)
       at com.ibm.ws.tcpchannel.internal.TCPReadRequestContextImpl.read(TCPReadRequestContextImpl.java:92)
       at com.ibm.ws.channel.ssl.internal.SSLReadServiceContext.read(SSLReadServiceContext.java:258)
       at com.ibm.ws.http.channel.internal.HttpServiceContextImpl.fillABuffer(HttpServiceContextImpl.java:4113)
       at com.ibm.ws.http.channel.internal.HttpServiceContextImpl.readSingleBlock(HttpServiceContextImpl.java:3341)
       at com.ibm.ws.http.channel.internal.HttpServiceContextImpl.readBodyBuffer(HttpServiceContextImpl.java:3445)
       at com.ibm.ws.http.channel.internal.inbound.HttpInboundServiceContextImpl.getRequestBodyBuffer(HttpInboundServiceContextImpl.java:1537)
       at com.ibm.ws.http.channel.internal.inbound.HttpInputStreamImpl.checkBuffer(HttpInputStreamImpl.java:101)
       at com.ibm.ws.http.channel.internal.inbound.HttpInputStreamImpl.read(HttpInputStreamImpl.java:181)
       at com.ibm.ws.webcontainer.srt.SRTInputStream.read(SRTInputStream.java:62)
       at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792)
       at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)
       at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744)
       at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:462)
       at com.worklight.gadgets.serving.ClientLogUploaderServlet.doPost(ClientLogUploaderServlet.java:271)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1287)
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:778) ```  

来源:https://stackoverflow.com/questions/61075546/java-io-ioexception-connection-closed-read-failed-possible-end-of-stream-enco

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!