ajp connection from mod_jk hangs on EAP 7 if a post HTTP request header contains 'Transfer-Encoding: chunked'
Issue
- We use mod_jk to proxy to EAP 7. If a POST request contains
Transfer-Encoding: chunked, the request never completes. The request thread on JBoss persists in a state trying to read the request body:
"default task-2@6414" prio=5 tid=0x3d nid=NA runnable
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Unknown Source:-1)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source:-1)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source:-1)
at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source:-1)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source:-1)
- locked <0x194a> (a sun.nio.ch.WindowsSelectorImpl)
- locked <0x194b> (a java.util.Collections$UnmodifiableSet)
- locked <0x194c> (a sun.nio.ch.Util$2)
at sun.nio.ch.SelectorImpl.select(Unknown Source:-1)
at sun.nio.ch.SelectorImpl.select(Unknown Source:-1)
at org.xnio.nio.SelectorUtils.await(SelectorUtils.java:46)
at org.xnio.nio.NioSocketConduit.awaitReadable(NioSocketConduit.java:345)
at org.xnio.conduits.AbstractSourceConduit.awaitReadable(AbstractSourceConduit.java:66)
at io.undertow.conduits.ReadDataStreamSourceConduit.awaitReadable(ReadDataStreamSourceConduit.java:101)
at io.undertow.server.protocol.ajp.AjpServerRequestConduit.awaitReadable(AjpServerRequestConduit.java:298)
at org.xnio.conduits.ConduitStreamSourceChannel.awaitReadable(ConduitStreamSourceChannel.java:151)
at io.undertow.channels.DetachableStreamSourceChannel.awaitReadable(DetachableStreamSourceChannel.java:77)
at io.undertow.server.HttpServerExchange$ReadDispatchChannel.awaitReadable(HttpServerExchange.java:2092)
at org.xnio.channels.Channels.readBlocking(Channels.java:295)
at io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:170)
at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:146)
at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:133)
- After a mod_jk connection serves a chunked POST request, the next request or ping attempt times out with no response from JBoss.
Environment
- JBoss Enterprise Application Platform (EAP) 7.0.x
- Apache httpd
- mod_jk
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
