BufferOverflowException happens in Undertow ajp-listener on JBoss EAP 7.x

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

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

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content