This exception is thrown if you have set a Content-Length header, and
then you don't write out enough data.
If this happens the connection is broken, as the client will be
expecting data that will never arrive, and as a result Undertow will
kill the connection.
This sounds like an application problem.
Stuart
Tom Goldsmith wrote:
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_RESPONSEin 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
_______________________________________________
undertow-dev mailing list
undertow-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev