I am using undertow through immutant [org.immutant/immutant
"2.x.incremental.148"] and am receiving the following exceptions:
*17:27:47.670 [XNIO-2 task-4] DEBUG io.undertow.request.io
<
http://io.undertow.request.io> - UT005013: An IOException occurred*
*org.xnio.channels.FixedLengthUnderflowException: 16095 bytes remaining*
* at
io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.terminateWrites(AbstractFixedLengthStreamSinkConduit.java:204)
~[undertow-core-1.0.7.Final.jar:1.0.7.Final]*
* at
org.xnio.conduits.ConduitStreamSinkChannel.shutdownWrites(ConduitStreamSinkChannel.java:178)
~[xnio-api-3.2.0.Final.jar:3.2.0.Final]*
* at
io.undertow.channels.DetachableStreamSinkChannel.shutdownWrites(DetachableStreamSinkChannel.java:60)
~[undertow-core-1.0.7.Final.jar:1.0.7.Final]*
* at
io.undertow.server.HttpServerExchange.closeAndFlushResponse(HttpServerExchange.java:1476)
[undertow-core-1.0.7.Final.jar:1.0.7.Final]*
* at
io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1465)
[undertow-core-1.0.7.Final.jar:1.0.7.Final]*
* at io.undertow.server.Connectors.executeRootHandler(Connectors.java:184)
[undertow-core-1.0.7.Final.jar:1.0.7.Final]*
* at
io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727)
[undertow-core-1.0.7.Final.jar:1.0.7.Final]*
* at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[na:1.8.0_05]*
* at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[na:1.8.0_05]*
* at java.lang.Thread.run(Thread.java:745) [na:1.8.0_05]*
*17:27:49.912 [XNIO-2 task-6] DEBUG io.undertow.request.io
<
http://io.undertow.request.io> - UT005013: An IOException occurred*
*io.undertow.server.TruncatedResponseException: null*
* at
io.undertow.server.protocol.http.HttpResponseConduit.truncateWrites(HttpResponseConduit.java:665)
~[undertow-core-1.0.7.Final.jar:1.0.7.Final]*
* at
io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.terminateWrites(AbstractFixedLengthStreamSinkConduit.java:206)
~[undertow-core-1.0.7.Final.jar:1.0.7.Final]*
* at
org.xnio.conduits.ConduitStreamSinkChannel.shutdownWrites(ConduitStreamSinkChannel.java:178)
~[xnio-api-3.2.0.Final.jar:3.2.0.Final]*
* at
io.undertow.channels.DetachableStreamSinkChannel.shutdownWrites(DetachableStreamSinkChannel.java:60)
~[undertow-core-1.0.7.Final.jar:1.0.7.Final]*
* at
io.undertow.server.HttpServerExchange.closeAndFlushResponse(HttpServerExchange.java:1476)
[undertow-core-1.0.7.Final.jar:1.0.7.Final]*
* at
io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1465)
[undertow-core-1.0.7.Final.jar:1.0.7.Final]*
* at immutant.web.undertow$handle_request.invoke(undertow.clj:123) [na:na]*
* at
immutant.web.undertow$create_http_handler$reify__1051.handleRequest(undertow.clj:130)
[na:na]*
* at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168)
[undertow-core-1.0.7.Final.jar:1.0.7.Final]*
* at
io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727)
[undertow-core-1.0.7.Final.jar:1.0.7.Final]*
* at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[na:1.8.0_05]*
* at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[na:1.8.0_05]*
* at java.lang.Thread.run(Thread.java:745) [na:1.8.0_05]*
I am making a GET request using Google's xhrio library, and the request
works fine when I use a service such as Postman. However, when I make
several simultaneous GET requests in javascript, undertow throws these
exceptions and returns an empty response (net::ERR_EMPTY_RESPONSE in
chrome).
I'm wondering what might be causing these issues, and if there are certain
HTTP headers I might be missing or need to remove from my requests. It
looks like the requests are all getting cancelled when another request is
received on the same channel, but it must be possible to fire multiple
asynchronous requests so I must be missing something.
Thanks!
Tom