java.net.SocketException: Broken pipe

Atlassian JIRA | David Chan [Atlassian] | 2 years ago
  1. 0

    h3. Summary This is a logging bug. There seems to be no functional problem from the UI side. When clicking on an mp4 attachment, it will play the video in the web browser with no indication of any problem, but JIRA logs a {{ClientAbortException}}. * This doesn't seem to happen for small files that are less than 1 MB (rought estimate) * For files that are a couple MB in size, it happens upon first request, but not after. I believe this is because of caching * I've been able to always reproduce this with larger files of great than a couple hundred MB h3. Environment Reproducible on the browsers below: - Chrome 42.0.2311.135 (64-bit) - Safari 7.1 (9537.85.10.17.1) The error does not happen when streaming the video on Firefox 37.0.2. h3. Steps to Reproduce # Upload a .mp4 video file to an issue ticket (e.g. [^SampleVideo_360x240_5mb.mp4]). #* Use larger files for best results # Click on the video, which will cause it to start playing in your web browser h3. Expected Results No errors are written to the logs. h3. Actual Results The errors below will be written to the JIRA logs: {{catalina.out}} or {{atlassian-jira.log}}: {code} 2015-03-27 16:02:54,535 http-bio-8080-exec-5 ERROR admin 962x252x1 1g0nbm1 0:0:0:0:0:0:0:1 /secure/attachment/23200/test-video .mp4 [jira.web.servlet.ViewAttachmentServlet] Error serving file for path /23200/test-video.mp4: com.atlassian.jira.exception.DataAccessException: ClientAbortException: java.net.SocketException: Broken pipe com.atlassian.jira.issue.attachment.AttachmentReadException: com.atlassian.jira.exception.DataAccessException: ClientAbortException: java.net.SocketException: Broken pipe at com.atlassian.jira.issue.attachment.DefaultAttachmentStore$3.call(DefaultAttachmentStore.java:197) at com.atlassian.util.concurrent.Executors$DefaultSubmitter$CallableRunner.run(Executors.java:62) at com.atlassian.util.concurrent.LimitedExecutor$Runner.run(LimitedExecutor.java:93) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: com.atlassian.jira.exception.DataAccessException: ClientAbortException: java.net.SocketException: Broken pipe at com.atlassian.jira.issue.managers.DefaultAttachmentManager$2.get(DefaultAttachmentManager.java:572) at com.atlassian.jira.issue.managers.DefaultAttachmentManager$2.get(DefaultAttachmentManager.java:562) at com.atlassian.util.concurrent.Functions$ToGoogleAdapter.apply(Functions.java:131) at com.atlassian.jira.issue.attachment.DefaultAttachmentStore$3.call(DefaultAttachmentStore.java:193) ... 5 more Caused by: ClientAbortException: java.net.SocketException: Broken pipe at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:407) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:432) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:420) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1026) at org.apache.commons.io.IOUtils.copy(IOUtils.java:999) at com.atlassian.jira.web.servlet.AbstractViewFileServlet$1.withInputStream(AbstractViewFileServlet.java:105) at com.atlassian.jira.web.servlet.AbstractViewFileServlet$1.withInputStream(AbstractViewFileServlet.java:95) at com.atlassian.jira.issue.managers.DefaultAttachmentManager$2.get(DefaultAttachmentManager.java:568) ... 8 more Caused by: java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113) at java.net.SocketOutputStream.write(SocketOutputStream.java:159) at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:240) at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:84) at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:192) at org.apache.coyote.Response.doWrite(Response.java:499) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:402) ... 18 more {code} {{localhost-<DATE>.log}}: {noformat} May 06, 2015 10:11:36 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [viewattachment] in context with path [/jira641] threw exception [com.atlassian.jira.issue.attachment.AttachmentReadException: com.atlassian.jira.exception.DataAccessException: ClientAbortException: java.net.SocketException: Broken pipe] with root cause java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113) at java.net.SocketOutputStream.write(SocketOutputStream.java:159) at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:240) at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:84) at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:192) at org.apache.coyote.Response.doWrite(Response.java:499) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:402) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:432) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:420) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91) at net.bull.javamelody.FilterServletOutputStream.write(FilterServletOutputStream.java:83) at net.bull.javamelody.CounterResponseStream.write(CounterResponseStream.java:82) at com.atlassian.gzipfilter.RoutableServletOutputStream.write(RoutableServletOutputStream.java:118) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1026) at org.apache.commons.io.IOUtils.copy(IOUtils.java:999) at com.atlassian.jira.web.servlet.AbstractViewFileServlet$1.withInputStream(AbstractViewFileServlet.java:108) at com.atlassian.jira.web.servlet.AbstractViewFileServlet$1.withInputStream(AbstractViewFileServlet.java:98) at com.atlassian.jira.issue.managers.DefaultAttachmentManager$8.get(DefaultAttachmentManager.java:874) at com.atlassian.jira.issue.managers.DefaultAttachmentManager$8.get(DefaultAttachmentManager.java:868) at com.atlassian.jira.issue.attachment.store.DefaultFileSystemAttachmentStore$2.get(DefaultFileSystemAttachmentStore.java:145) at com.atlassian.jira.issue.attachment.store.DefaultFileSystemAttachmentStore$2.get(DefaultFileSystemAttachmentStore.java:141) at com.atlassian.jira.issue.attachment.store.DefaultFileSystemAttachmentStore$3.call(DefaultFileSystemAttachmentStore.java:178) at com.atlassian.util.concurrent.Executors$DefaultSubmitter$CallableRunner.run(Executors.java:62) at com.atlassian.util.concurrent.LimitedExecutor$Runner.run(LimitedExecutor.java:93) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) {noformat} h3. Notes Instances using APR (Apache Portable Runtime) will have a slightly different stack trace. The problem is still reproducible in those environments though.

    Atlassian JIRA | 2 years ago | David Chan [Atlassian]
    java.net.SocketException: Broken pipe
  2. 0

    h3. Summary This is a logging bug. There seems to be no functional problem from the UI side. When clicking on an mp4 attachment, it will play the video in the web browser with no indication of any problem, but JIRA logs a {{ClientAbortException}}. * This doesn't seem to happen for small files that are less than 1 MB (rought estimate) * For files that are a couple MB in size, it happens upon first request, but not after. I believe this is because of caching * I've been able to always reproduce this with larger files of great than a couple hundred MB h3. Environment Reproducible on the browsers below: - Chrome 42.0.2311.135 (64-bit) - Safari 7.1 (9537.85.10.17.1) The error does not happen when streaming the video on Firefox 37.0.2. h3. Steps to Reproduce # Upload a .mp4 video file to an issue ticket (e.g. [^SampleVideo_360x240_5mb.mp4]). #* Use larger files for best results # Click on the video, which will cause it to start playing in your web browser h3. Expected Results No errors are written to the logs. h3. Actual Results The errors below will be written to the JIRA logs: {{catalina.out}} or {{atlassian-jira.log}}: {code} 2015-03-27 16:02:54,535 http-bio-8080-exec-5 ERROR admin 962x252x1 1g0nbm1 0:0:0:0:0:0:0:1 /secure/attachment/23200/test-video .mp4 [jira.web.servlet.ViewAttachmentServlet] Error serving file for path /23200/test-video.mp4: com.atlassian.jira.exception.DataAccessException: ClientAbortException: java.net.SocketException: Broken pipe com.atlassian.jira.issue.attachment.AttachmentReadException: com.atlassian.jira.exception.DataAccessException: ClientAbortException: java.net.SocketException: Broken pipe at com.atlassian.jira.issue.attachment.DefaultAttachmentStore$3.call(DefaultAttachmentStore.java:197) at com.atlassian.util.concurrent.Executors$DefaultSubmitter$CallableRunner.run(Executors.java:62) at com.atlassian.util.concurrent.LimitedExecutor$Runner.run(LimitedExecutor.java:93) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: com.atlassian.jira.exception.DataAccessException: ClientAbortException: java.net.SocketException: Broken pipe at com.atlassian.jira.issue.managers.DefaultAttachmentManager$2.get(DefaultAttachmentManager.java:572) at com.atlassian.jira.issue.managers.DefaultAttachmentManager$2.get(DefaultAttachmentManager.java:562) at com.atlassian.util.concurrent.Functions$ToGoogleAdapter.apply(Functions.java:131) at com.atlassian.jira.issue.attachment.DefaultAttachmentStore$3.call(DefaultAttachmentStore.java:193) ... 5 more Caused by: ClientAbortException: java.net.SocketException: Broken pipe at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:407) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:432) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:420) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1026) at org.apache.commons.io.IOUtils.copy(IOUtils.java:999) at com.atlassian.jira.web.servlet.AbstractViewFileServlet$1.withInputStream(AbstractViewFileServlet.java:105) at com.atlassian.jira.web.servlet.AbstractViewFileServlet$1.withInputStream(AbstractViewFileServlet.java:95) at com.atlassian.jira.issue.managers.DefaultAttachmentManager$2.get(DefaultAttachmentManager.java:568) ... 8 more Caused by: java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113) at java.net.SocketOutputStream.write(SocketOutputStream.java:159) at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:240) at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:84) at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:192) at org.apache.coyote.Response.doWrite(Response.java:499) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:402) ... 18 more {code} {{localhost-<DATE>.log}}: {noformat} May 06, 2015 10:11:36 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [viewattachment] in context with path [/jira641] threw exception [com.atlassian.jira.issue.attachment.AttachmentReadException: com.atlassian.jira.exception.DataAccessException: ClientAbortException: java.net.SocketException: Broken pipe] with root cause java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113) at java.net.SocketOutputStream.write(SocketOutputStream.java:159) at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:240) at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:84) at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:192) at org.apache.coyote.Response.doWrite(Response.java:499) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:402) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:432) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:420) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91) at net.bull.javamelody.FilterServletOutputStream.write(FilterServletOutputStream.java:83) at net.bull.javamelody.CounterResponseStream.write(CounterResponseStream.java:82) at com.atlassian.gzipfilter.RoutableServletOutputStream.write(RoutableServletOutputStream.java:118) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1026) at org.apache.commons.io.IOUtils.copy(IOUtils.java:999) at com.atlassian.jira.web.servlet.AbstractViewFileServlet$1.withInputStream(AbstractViewFileServlet.java:108) at com.atlassian.jira.web.servlet.AbstractViewFileServlet$1.withInputStream(AbstractViewFileServlet.java:98) at com.atlassian.jira.issue.managers.DefaultAttachmentManager$8.get(DefaultAttachmentManager.java:874) at com.atlassian.jira.issue.managers.DefaultAttachmentManager$8.get(DefaultAttachmentManager.java:868) at com.atlassian.jira.issue.attachment.store.DefaultFileSystemAttachmentStore$2.get(DefaultFileSystemAttachmentStore.java:145) at com.atlassian.jira.issue.attachment.store.DefaultFileSystemAttachmentStore$2.get(DefaultFileSystemAttachmentStore.java:141) at com.atlassian.jira.issue.attachment.store.DefaultFileSystemAttachmentStore$3.call(DefaultFileSystemAttachmentStore.java:178) at com.atlassian.util.concurrent.Executors$DefaultSubmitter$CallableRunner.run(Executors.java:62) at com.atlassian.util.concurrent.LimitedExecutor$Runner.run(LimitedExecutor.java:93) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) {noformat} h3. Notes Instances using APR (Apache Portable Runtime) will have a slightly different stack trace. The problem is still reproducible in those environments though.

    Atlassian JIRA | 2 years ago | David Chan [Atlassian]
    java.net.SocketException: Broken pipe
  3. 0

    CXF : Socket Time Out Exception

    Stack Overflow | 5 years ago | Preethi Jain
    java.net.SocketException: Broken pipe
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error with two pages

    Google Groups | 3 years ago | Meik TeƟmer
    java.net.SocketException: Broken pipe
  6. 0

    How to solve java.net.SocketException: Software caused connection abort: socket write error exception

    Stack Overflow | 2 years ago | SRY_JAVA
    java.net.SocketException: Software caused connection abort: socket write error

  1. linxiaolong 1 times, last 3 weeks ago
  2. Tahir 11 times, last 1 month ago
  3. serious2monkeys 6 times, last 1 month ago
  4. linxiaolong 1 times, last 4 months ago
  5. kkandda 2 times, last 6 months ago
5 more registered users
85 unregistered visitors
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.net.SocketException

    Broken pipe

    at java.net.SocketOutputStream.socketWrite0()
  2. Java RT
    SocketOutputStream.write
    1. java.net.SocketOutputStream.socketWrite0(Native Method)
    2. java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
    3. java.net.SocketOutputStream.write(SocketOutputStream.java:159)
    3 frames
  3. Grizzly HTTP
    InternalOutputBuffer.realWriteBytes
    1. org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215)
    1 frame
  4. Tomcat Util
    ByteChunk.append
    1. org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
    2. org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366)
    2 frames
  5. Grizzly HTTP
    Response.doWrite
    1. org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:240)
    2. org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:84)
    3. org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:192)
    4. org.apache.coyote.Response.doWrite(Response.java:499)
    4 frames
  6. Glassfish Core
    OutputBuffer.realWriteBytes
    1. org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:402)
    1 frame
  7. Tomcat Util
    ByteChunk.append
    1. org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
    2. org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366)
    2 frames
  8. Glassfish Core
    CoyoteOutputStream.write
    1. org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:432)
    2. org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:420)
    3. org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91)
    3 frames
  9. net.bull.javamelody
    CounterResponseStream.write
    1. net.bull.javamelody.FilterServletOutputStream.write(FilterServletOutputStream.java:83)
    2. net.bull.javamelody.CounterResponseStream.write(CounterResponseStream.java:82)
    2 frames
  10. com.atlassian.gzipfilter
    RoutableServletOutputStream.write
    1. com.atlassian.gzipfilter.RoutableServletOutputStream.write(RoutableServletOutputStream.java:118)
    1 frame
  11. Commons IO
    IOUtils.copy
    1. org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1026)
    2. org.apache.commons.io.IOUtils.copy(IOUtils.java:999)
    2 frames
  12. com.atlassian.jira
    DefaultFileSystemAttachmentStore$3.call
    1. com.atlassian.jira.web.servlet.AbstractViewFileServlet$1.withInputStream(AbstractViewFileServlet.java:108)
    2. com.atlassian.jira.web.servlet.AbstractViewFileServlet$1.withInputStream(AbstractViewFileServlet.java:98)
    3. com.atlassian.jira.issue.managers.DefaultAttachmentManager$8.get(DefaultAttachmentManager.java:874)
    4. com.atlassian.jira.issue.managers.DefaultAttachmentManager$8.get(DefaultAttachmentManager.java:868)
    5. com.atlassian.jira.issue.attachment.store.DefaultFileSystemAttachmentStore$2.get(DefaultFileSystemAttachmentStore.java:145)
    6. com.atlassian.jira.issue.attachment.store.DefaultFileSystemAttachmentStore$2.get(DefaultFileSystemAttachmentStore.java:141)
    7. com.atlassian.jira.issue.attachment.store.DefaultFileSystemAttachmentStore$3.call(DefaultFileSystemAttachmentStore.java:178)
    7 frames
  13. com.atlassian.util
    LimitedExecutor$Runner.run
    1. com.atlassian.util.concurrent.Executors$DefaultSubmitter$CallableRunner.run(Executors.java:62)
    2. com.atlassian.util.concurrent.LimitedExecutor$Runner.run(LimitedExecutor.java:93)
    2 frames
  14. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    3. java.lang.Thread.run(Thread.java:724)
    3 frames