ClientAbortException errors appear in Jira server logs
Symptoms
The following error appears in the logs:
WARNING: Exception Processing ErrorPage[errorCode=500, location=/500page.jsp]
ClientAbortException: java.net.SocketException: Broken pipe
WARNING: Exception Processing ErrorPage[errorCode=404, location=/fourohfour.action]
ClientAbortException: java.net.SocketException: Broken pipe
OR
2015-12-24 13:33:15,679 http-nio-8080-exec-19 ERROR [o.a.c.c.C.[.[localhost].[/].[noopservlet]] Servlet.service() for servlet [noopservlet] in context with path [] threw exception
java.lang.RuntimeException: org.apache.catalina.connector.ClientAbortException: java.io.IOException: An established connection was aborted by the software in your host machine
at com.atlassian.plugin.cache.filecache.impl.StreamsCache.streamFromFile(StreamsCache.java:140)
at com.atlassian.plugin.cache.filecache.impl.OneStreamCache.stream(OneStreamCache.java:65)
at com.atlassian.plugin.cache.filecache.impl.FileCacheImpl.cache(FileCacheImpl.java:100)
at com.atlassian.plugin.webresource.http.Controller$1CachedContentImpl.cache(Controller.java:317)
at com.atlassian.plugin.webresource.http.Controller$1CachedContentImpl.writeTo(Controller.java:272)
at com.atlassian.plugin.webresource.http.Controller.sendCached(Controller.java:364)
at com.atlassian.plugin.webresource.http.Controller.serveResources(Controller.java:179)
at com.atlassian.plugin.webresource.http.Controller.serveBatch(Controller.java:78)
at com.atlassian.plugin.webresource.http.Router$5.apply(Router.java:97)
at com.atlassian.plugin.webresource.http.Router$5.apply(Router.java:89)
at com.atlassian.plugin.webresource.support.http.BaseRouter.callHandler(BaseRouter.java:185)
at com.atlassian.plugin.webresource.support.http.BaseRouter.dispatch(BaseRouter.java:161)
at com.atlassian.plugin.webresource.servlet.PluginResourceDownload.serveFile(PluginResourceDownload.java:67)
at com.atlassian.plugin.servlet.AbstractFileServerServlet.doGet(AbstractFileServerServlet.java:33)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
... 116 filtered
at com.atlassian.jira.plugin.webresource.CachingResourceDownloadRewriteRule$1.execute(CachingResourceDownloadRewriteRule.java:60)
at org.tuckey.web.filters.urlrewrite.RewrittenUrlClass.doRewrite(RewrittenUrlClass.java:61)
... 60 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.connector.ClientAbortException: java.io.IOException: An established connection was aborted by the software in your host machine
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:253)
at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:211)
at java.util.zip.GZIPOutputStream.write(GZIPOutputStream.java:145)
at com.atlassian.gzipfilter.GzipResponseStream.write(GzipResponseStream.java:46)
at com.atlassian.gzipfilter.RoutableServletOutputStream.write(RoutableServletOutputStream.java:134)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1384)
at com.atlassian.plugin.cache.filecache.impl.StreamsCache.streamFromFile(StreamsCache.java:135)
... 197 more
Caused by: java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
... 10 filtered
... 209 more
OR
ERROR [o.a.c.c.C.[.[localhost].[/].[default]] Servlet.service() for servlet [default] in context with path [] threw exception
java.lang.RuntimeException: org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
at com.atlassian.servicedesk.internal.util.scala.ScalaJavaInterOp$1.apply(ScalaJavaInterOp.java:27)
at com.atlassian.servicedesk.internal.utils.context.CustomerContextUtil$.outOfCustomerContext(CustomerContextUtil.scala:48)
at com.atlassian.servicedesk.internal.utils.context.CustomerContextUtil.outOfCustomerContext(CustomerContextUtil.scala)
at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.outOfCustomerContext(CustomerContextServiceImpl.java:24)
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:164)
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:120)
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:112)
... 55 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:342)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:317)
at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:110)
at com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.flush(ContainerResponse.java:146)
at org.codehaus.jackson.impl.Utf8Generator.flush(Utf8Generator.java:1085)
at org.codehaus.jackson.map.ObjectMapper.writeValue(ObjectMapper.java:1606)
at org.codehaus.jackson.jaxrs.JacksonJsonProvider.writeTo(JacksonJsonProvider.java:558)
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:302)
... 5 filtered
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154)
... 1 filtered
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68)
... 91 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70)
... 16 filtered
at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37)
... 22 filtered
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:169)
at com.atlassian.servicedesk.internal.util.scala.ScalaJavaInterOp$1.apply(ScalaJavaInterOp.java:25)
... 65 more
Caused by: java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
Cause 1
This exception can mean that the connection to the client browser was aborted before the response is fully transferred. It is a harmless warning as it can be due to transient network problems or the user aborts/refreshes the page before it loaded.
A list of other causes are:
- The user closed the browser before the page loaded (this happens at specific moments during the loading of the page, more easily reproduced the slower the connection is).
- Their Internet connection failed during loading.
- They went to another page before the page loaded.
- The browser timed the connection out before the page loaded (would have to be a large page).
- Canceling a download (this gives a guaranteed exception)
Cause 2
When using a proxy/load balancer (like Nginx), the handling of connections being closed from the client side is handled in a less-than-graceful way, giving this exception for cases when normally it would not happen.
Resolution 1
This can be ignored unless there are other issues that are currently occurring. For example, if the JIRA application server is throwing a lot of these, it might be a sign of a performance problem. See Common causes for Jira Server crashes and performance issues for further information.
Resolution 2
Depending on the proxy/load balancer, there might be different ways to suppress this exception:
- For Nginx: has a flag to stop giving that specific exception, which has to be placed in the configuration file of the proxy: proxy_ignore_client_abort on;
As mentioned before, if the exception is being thrown too often, it may be a symptom of performance or network issues and it is best to see Common causes for Jira Server crashes and performance issues for further information.