java.io.IOException: Connection is closed

Stack Overflow | faraa | 4 months ago
  1. Speed up your debug routine!

    Automated exception search integrated into your IDE

  2. 0

    Fo a client I migrated from Glassfish 3.1.2.2 to the latest Glassfish 4.1 and now suddenly I can see java.util.concurrent.TimeoutException (see logs below). I can't tell where this comes from. I checked all the log files from GF 3.1.2.2 and there I can't find even a single entry... [2015-02-23T11:06:43.377+0100] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=27 _ThreadName=http-listener-1(2)] [timeMillis: 1424686003377] [levelValue: 900] [[ StandardWrapperValve[default]: Servlet.service() for servlet default threw exception java.io.IOException: java.util.concurrent.TimeoutException at org.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:973) at org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:686) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:355) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:342) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:161) at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:2199) at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1085) at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:568) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282) at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) at java.lang.Thread.run(Thread.java:745) Caused by: java.util.concurrent.TimeoutException at org.glassfish.grizzly.impl.SafeFutureImpl$Sync.innerGet(SafeFutureImpl.java:357) at org.glassfish.grizzly.impl.SafeFutureImpl.get(SafeFutureImpl.java:264) at org.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:962) ... 42 more ]]

    Java.net JIRA | 2 years ago | nabizamani
    java.io.IOException: Broken pipe
  3. 0

    Message processing stopped after exception

    GitHub | 6 months ago | hc4
    org.glassfish.jersey.server.internal.process.MappableException: java.io.IOException: Connection is closed
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.IOException

    Broken pipe

    at sun.nio.ch.FileDispatcherImpl.write0()
  2. Java RT
    SocketChannelImpl.write
    1. sun.nio.ch.FileDispatcherImpl.write0(Native Method)
    2. sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
    3. sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
    4. sun.nio.ch.IOUtil.write(IOUtil.java:51)
    5. sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
    5 frames
  3. Grizzly
    FilterChainContext.write
    1. org.glassfish.grizzly.nio.transport.TCPNIOUtils.flushByteBuffer(TCPNIOUtils.java:149)
    2. org.glassfish.grizzly.nio.transport.TCPNIOUtils.writeSimpleBuffer(TCPNIOUtils.java:133)
    3. org.glassfish.grizzly.nio.transport.TCPNIOAsyncQueueWriter.write0(TCPNIOAsyncQueueWriter.java:126)
    4. org.glassfish.grizzly.nio.transport.TCPNIOAsyncQueueWriter.write0(TCPNIOAsyncQueueWriter.java:106)
    5. org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(AbstractNIOAsyncQueueWriter.java:260)
    6. org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(AbstractNIOAsyncQueueWriter.java:169)
    7. org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(AbstractNIOAsyncQueueWriter.java:71)
    8. org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleWrite(TCPNIOTransportFilter.java:126)
    9. org.glassfish.grizzly.filterchain.TransportFilter.handleWrite(TransportFilter.java:191)
    10. org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(ExecutorResolver.java:111)
    11. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
    12. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
    13. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
    14. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
    15. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    16. org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:890)
    16 frames
  4. Nucleus Grizzly jars Combining
    BackChannelFilter.handleWrite
    1. org.glassfish.grizzly.portunif.BackChannelFilter.handleWrite(BackChannelFilter.java:111)
    1 frame
  5. Grizzly
    FilterChainContext.write
    1. org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(ExecutorResolver.java:111)
    2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
    3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
    4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
    5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
    6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    7. org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:890)
    8. org.glassfish.grizzly.ssl.SSLBaseFilter.handleWrite(SSLBaseFilter.java:363)
    9. org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(ExecutorResolver.java:111)
    10. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
    11. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
    12. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
    13. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
    14. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    15. org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:890)
    15 frames
  6. Nucleus Grizzly jars Combining
    BackChannelFilter.handleWrite
    1. org.glassfish.grizzly.portunif.BackChannelFilter.handleWrite(BackChannelFilter.java:111)
    1 frame
  7. Grizzly
    FilterChainContext.write
    1. org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(ExecutorResolver.java:111)
    2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
    3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
    4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
    5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
    6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    7. org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:890)
    8. org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:858)
    8 frames
  8. grizzly-http
    OutputBuffer.write
    1. org.glassfish.grizzly.http.io.OutputBuffer.flushBuffer(OutputBuffer.java:1029)
    2. org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:681)
    2 frames
  9. Glassfish Core
    CoyoteOutputStream.write
    1. org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:355)
    2. org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:342)
    3. org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:161)
    3 frames
  10. Java RT
    OutputStreamWriter.flush
    1. sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
    2. sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
    3. sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
    4. sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
    5. java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
    5 frames
  11. JSF
    HtmlResponseWriter.endDocument
    1. com.sun.faces.renderkit.html_basic.HtmlResponseWriter.endDocument(HtmlResponseWriter.java:442)
    1 frame
  12. com.sun.jsftemplating
    LayoutViewHandler.renderView
    1. com.sun.jsftemplating.layout.LayoutViewHandler.renderView(LayoutViewHandler.java:686)
    1 frame
  13. JSF
    LifecycleImpl.render
    1. com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
    2. com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    3. com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
    3 frames
  14. JavaEE 7
    FacesServlet.service
    1. javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
    1 frame
  15. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
    2. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
    3. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
    3 frames
  16. com.sun.webui
    UploadFilter.doFilter
    1. com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233)
    1 frame
  17. Glassfish Core
    StandardPipeline.doChainInvoke
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
    5. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
    6. org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:678)
    6 frames
  18. Glassfish
    WebPipeline.invoke
    1. com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
    1 frame
  19. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
    2. org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
    3. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
    3 frames
  20. Kernel Classes
    ContainerMapper.service
    1. com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
    2. com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
    2 frames
  21. Grizzly Server
    HttpServerFilter.handleRead
    1. org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
    2. org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
    3. org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    3 frames
  22. Grizzly
    ProcessorExecutor.execute
    1. org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
    3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
    4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
    5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
    6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    6 frames
  23. Nucleus Grizzly jars Combining
    PUFilter.handleRead
    1. org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
    1 frame
  24. Grizzly
    ProcessorExecutor.execute
    1. org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
    3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
    4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
    5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
    6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    6 frames
  25. Nucleus Grizzly jars Combining
    PUFilter.handleRead
    1. org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
    1 frame
  26. Grizzly
    AbstractThreadPool$Worker.run
    1. org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
    3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
    4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
    5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
    6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    7. org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
    8. org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    9. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    10. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    11. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    12. org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
    13. org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
    13 frames
  27. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame