java.nio.channels.WritePendingException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I'm running Puppet server with a large (>1000) number of nodes, the puppet server software is intermittently throwing this error: {noformat} 2015-07-21 16:00:52,904 WARN [o.e.j.s.HttpChannel] /production/catalog/xxxxx java.nio.channels.WritePendingException: null at org.eclipse.jetty.server.HttpConnection$SendCallback.reset(HttpConnection.java:624) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpConnection$SendCallback.access$100(HttpConnection.java:594) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:479) [puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:768) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:142) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:135) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpOutput.close(HttpOutput.java:166) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpWriter.close(HttpWriter.java:49) ~[puppet-server-release.jar:na] at java.io.PrintWriter.close(PrintWriter.java:339) ~[na:1.8.0_51] at ring.util.servlet$set_body.invoke(servlet.clj:86) ~[na:na] at ring.util.servlet$update_servlet_response.invoke(servlet.clj:112) ~[na:na] at puppetlabs.trapperkeeper.services.webserver.jetty9_core$ring_handler$fn__8410.invoke(jetty9_core.clj:410) ~[na:na] at puppetlabs.trapperkeeper.services.webserver.jetty9_core.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle(Unknown Source) ~[na:na] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1129) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1065) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.Server.handle(Server.java:497) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [puppet-server-release.jar:na] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [puppet-server-release.jar:na] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [puppet-server-release.jar:na] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [puppet-server-release.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51] {noformat}
    via by Brian Rak,
  • I'm running Puppet server with a large (>1000) number of nodes, the puppet server software is intermittently throwing this error: {noformat} 2015-07-21 16:00:52,904 WARN [o.e.j.s.HttpChannel] /production/catalog/xxxxx java.nio.channels.WritePendingException: null at org.eclipse.jetty.server.HttpConnection$SendCallback.reset(HttpConnection.java:624) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpConnection$SendCallback.access$100(HttpConnection.java:594) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:479) [puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:768) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:142) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:135) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpOutput.close(HttpOutput.java:166) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpWriter.close(HttpWriter.java:49) ~[puppet-server-release.jar:na] at java.io.PrintWriter.close(PrintWriter.java:339) ~[na:1.8.0_51] at ring.util.servlet$set_body.invoke(servlet.clj:86) ~[na:na] at ring.util.servlet$update_servlet_response.invoke(servlet.clj:112) ~[na:na] at puppetlabs.trapperkeeper.services.webserver.jetty9_core$ring_handler$fn__8410.invoke(jetty9_core.clj:410) ~[na:na] at puppetlabs.trapperkeeper.services.webserver.jetty9_core.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle(Unknown Source) ~[na:na] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1129) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1065) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.Server.handle(Server.java:497) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) ~[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [puppet-server-release.jar:na] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [puppet-server-release.jar:na] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [puppet-server-release.jar:na] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [puppet-server-release.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51] {noformat}
    via by Brian Rak,
  • The new async BOSH logic cannot handle larger packets (seems like about > 64 KB) and fails to deliver correct responses to the client: {noformat} java.nio.channels.WritePendingException at org.eclipse.jetty.server.HttpConnection$SendCallback.reset(HttpConnection.java:624) at org.eclipse.jetty.server.HttpConnection$SendCallback.access$100(HttpConnection.java:594) at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:479) at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:768) at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801) at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:142) at org.eclipse.jetty.servlets.gzip.GzipHttpOutput.write(GzipHttpOutput.java:74) at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:135) at org.eclipse.jetty.server.HttpOutput.close(HttpOutput.java:166) at org.eclipse.jetty.server.Response.closeOutput(Response.java:1017) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:421) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:724) {noformat} The reason is, that the AsyncContext.complete() method is called, while a write operation is still in progress. As a consequence, clients only receive a partial response and will fail to parse it correctly.
    via by csh,
  • The new async BOSH logic cannot handle larger packets (seems like about > 64 KB) and fails to deliver correct responses to the client: {noformat} java.nio.channels.WritePendingException at org.eclipse.jetty.server.HttpConnection$SendCallback.reset(HttpConnection.java:624) at org.eclipse.jetty.server.HttpConnection$SendCallback.access$100(HttpConnection.java:594) at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:479) at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:768) at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801) at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:142) at org.eclipse.jetty.servlets.gzip.GzipHttpOutput.write(GzipHttpOutput.java:74) at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:135) at org.eclipse.jetty.server.HttpOutput.close(HttpOutput.java:166) at org.eclipse.jetty.server.Response.closeOutput(Response.java:1017) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:421) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:724) {noformat} The reason is, that the AsyncContext.complete() method is called, while a write operation is still in progress. As a consequence, clients only receive a partial response and will fail to parse it correctly.
    via by csh,
  • The new async BOSH logic cannot handle larger packets (seems like about > 64 KB) and fails to deliver correct responses to the client: {noformat} java.nio.channels.WritePendingException at org.eclipse.jetty.server.HttpConnection$SendCallback.reset(HttpConnection.java:624) at org.eclipse.jetty.server.HttpConnection$SendCallback.access$100(HttpConnection.java:594) at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:479) at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:768) at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801) at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:142) at org.eclipse.jetty.servlets.gzip.GzipHttpOutput.write(GzipHttpOutput.java:74) at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:135) at org.eclipse.jetty.server.HttpOutput.close(HttpOutput.java:166) at org.eclipse.jetty.server.Response.closeOutput(Response.java:1017) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:421) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:724) {noformat} The reason is, that the AsyncContext.complete() method is called, while a write operation is still in progress. As a consequence, clients only receive a partial response and will fail to parse it correctly.
    via by csh,
    • java.nio.channels.WritePendingException: null at org.eclipse.jetty.server.HttpConnection$SendCallback.reset(HttpConnection.java:624)[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpConnection$SendCallback.access$100(HttpConnection.java:594)[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:479)[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:768)[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801)[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:142)[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:135)[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpOutput.close(HttpOutput.java:166)[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpWriter.close(HttpWriter.java:49)[puppet-server-release.jar:na] at java.io.PrintWriter.close(PrintWriter.java:339)[na:1.8.0_51] at ring.util.servlet$set_body.invoke(servlet.clj:86)[na:na] at ring.util.servlet$update_servlet_response.invoke(servlet.clj:112)[na:na] at puppetlabs.trapperkeeper.services.webserver.jetty9_core$ring_handler$fn__8410.invoke(jetty9_core.clj:410)[na:na] at puppetlabs.trapperkeeper.services.webserver.jetty9_core.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle(Unknown Source)[na:na] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1129)[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1065)[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95)[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159)[puppet-server-release.jar:na] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[puppet-server-release.jar:na] at org.eclipse.jetty.server.Server.handle(Server.java:497)[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)[puppet-server-release.jar:na] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[puppet-server-release.jar:na] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)[puppet-server-release.jar:na] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[puppet-server-release.jar:na] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[puppet-server-release.jar:na] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_51]
    No Bugmate found.