BufferOverflowException in Undertow

Solution Verified - Updated -

Issue

  • We see an exception like the following on EAP 7:
2016-12-07 17:28:12,708 ERROR [io.undertow.request] (default task-62) UT005071: Undertow request failed HttpServerExchange: java.nio.BufferOverflowException
    at java.nio.Buffer.nextPutIndex(Buffer.java:521)
    at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:297)
    at io.undertow.server.protocol.ajp.AjpServerResponseConduit.putString(AjpServerResponseConduit.java:156)
    at io.undertow.server.protocol.ajp.AjpServerResponseConduit.processAJPHeader(AjpServerResponseConduit.java:237)
    at io.undertow.server.protocol.ajp.AjpServerResponseConduit.queueCloseFrames(AjpServerResponseConduit.java:264)
    at io.undertow.conduits.AbstractFramedStreamSinkConduit.terminateWrites(AbstractFramedStreamSinkConduit.java:195)
    at org.xnio.conduits.ConduitStreamSinkChannel.shutdownWrites(ConduitStreamSinkChannel.java:178)
    at io.undertow.channels.DetachableStreamSinkChannel.shutdownWrites(DetachableStreamSinkChannel.java:79)
    at io.undertow.server.HttpServerExchange.closeAndFlushResponse(HttpServerExchange.java:1663)
    at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1642)
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:226)
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:802)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Environment

  • JBoss Enterprise Application Platform (EAP) 7.x
  • Undertow

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.