camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Cosentino <ancosen1...@yahoo.com.INVALID>
Subject R: Jetty consumer responds with a 500 error java.io.IOException: Response header too large
Date Tue, 19 Dec 2017 16:27:03 GMT
What version of camel are you using?

Inviato da Yahoo Mail su Android 
 
  Il mar, 19 dic, 2017 alle 16:45, Laurentiu Trica<laurentiu.trica@moredevs.ro> ha scritto:
  Hello,

I have a problem with the Jetty consumer. I receive a file with an attached
file (Multi-Part Form), but if the file is bigger than a few KB, I get the
bellow Stack trace. If the file is smaller, everything works fine.

The strange part is that for a size of 80KB I still receive the file in the
route, but the response to the HTTP client is:
HTTP/1.1 500 Server Error
Connection: close
Server: Jetty(9.2.14.v20151106)

If the file's size is, let's say, 2 MB, then the route doesn't get the file
anymore and the response to the client is the same.

I tried to set the request/response buffers to bigger values, but it didn't
help:
<from uri="jetty:
http://0.0.0.0:9086/Test?responseHeaderSize=32768000&responseBufferSize=32768000&requestBufferSize=32768000&requestHeaderSize=32768000
"/>

Any ideas? Can you please help?

*Stack trace:*
2017-12-19 16:33:02,802 | WARN  | tp466415455-3362 | ServletHandler
          | 119 - org.eclipse.jetty.util - 9.2.14.v20151106 | /Test
java.io.IOException: Response header too large
at
org.eclipse.jetty.http.HttpGenerator.generateResponse(HttpGenerator.java:400)[107:org.eclipse.jetty.http:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:655)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:246)[119:org.eclipse.jetty.util:9.2.14.v20151106]
at
org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:208)[119:org.eclipse.jetty.util:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:471)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:763)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:147)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:140)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:242)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.apache.camel.util.IOHelper.copy(IOHelper.java:201)[59:org.apache.camel.camel-core:2.16.3]
at
org.apache.camel.http.common.DefaultHttpBinding.copyStream(DefaultHttpBinding.java:369)[143:org.apache.camel.camel-http-common:2.16.3]
at
org.apache.camel.http.common.DefaultHttpBinding.doWriteDirectResponse(DefaultHttpBinding.java:433)[143:org.apache.camel.camel-http-common:2.16.3]
at
org.apache.camel.http.common.DefaultHttpBinding.doWriteResponse(DefaultHttpBinding.java:332)[143:org.apache.camel.camel-http-common:2.16.3]
at
org.apache.camel.http.common.DefaultHttpBinding.writeResponse(DefaultHttpBinding.java:264)[143:org.apache.camel.camel-http-common:2.16.3]
at
org.apache.camel.component.jetty.CamelContinuationServlet.service(CamelContinuationServlet.java:227)[155:org.apache.camel.camel-jetty-common:2.16.3]
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[54:javax.servlet-api:3.1.0]
at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[117:org.eclipse.jetty.servlet:9.2.14.v20151106]
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)[117:org.eclipse.jetty.servlet:9.2.14.v20151106]
at
org.apache.camel.component.jetty.CamelFilterWrapper.doFilter(CamelFilterWrapper.java:45)[155:org.apache.camel.camel-jetty-common:2.16.3]
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[117:org.eclipse.jetty.servlet:9.2.14.v20151106]
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)[117:org.eclipse.jetty.servlet:9.2.14.v20151106]
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[117:org.eclipse.jetty.servlet:9.2.14.v20151106]
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.Server.handleAsync(Server.java:549)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:318)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[108:org.eclipse.jetty.io:9
.2.14.v20151106]
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[119:org.eclipse.jetty.util:9.2.14.v20151106]
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[119:org.eclipse.jetty.util:9.2.14.v20151106]
at java.lang.Thread.run(Thread.java:748)[:1.7.0_151]
Caused by: java.nio.BufferOverflowException
at java.nio.Buffer.nextPutIndex(Buffer.java:513)[:1.7.0_151]
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:163)[:1.7.0_151]
at
org.eclipse.jetty.http.HttpGenerator.putSanitisedValue(HttpGenerator.java:1057)[107:org.eclipse.jetty.http:9.2.14.v20151106]
at
org.eclipse.jetty.http.HttpGenerator.putTo(HttpGenerator.java:1079)[107:org.eclipse.jetty.http:9.2.14.v20151106]
at
org.eclipse.jetty.http.HttpGenerator.generateHeaders(HttpGenerator.java:703)[107:org.eclipse.jetty.http:9.2.14.v20151106]
at
org.eclipse.jetty.http.HttpGenerator.generateResponse(HttpGenerator.java:385)[107:org.eclipse.jetty.http:9.2.14.v20151106]
... 33 more
2017-12-19 16:33:02,804 | WARN  | tp466415455-3362 | HttpChannel
          | 119 - org.eclipse.jetty.util - 9.2.14.v20151106 |
/LogsolToBBATest
java.io.IOException: Response header too large
at
org.eclipse.jetty.http.HttpGenerator.generateResponse(HttpGenerator.java:400)[107:org.eclipse.jetty.http:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:655)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:246)[119:org.eclipse.jetty.util:9.2.14.v20151106]
at
org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:208)[119:org.eclipse.jetty.util:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:471)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:763)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:147)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:140)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:242)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.apache.camel.util.IOHelper.copy(IOHelper.java:201)[59:org.apache.camel.camel-core:2.16.3]
at
org.apache.camel.http.common.DefaultHttpBinding.copyStream(DefaultHttpBinding.java:369)[143:org.apache.camel.camel-http-common:2.16.3]
at
org.apache.camel.http.common.DefaultHttpBinding.doWriteDirectResponse(DefaultHttpBinding.java:433)[143:org.apache.camel.camel-http-common:2.16.3]
at
org.apache.camel.http.common.DefaultHttpBinding.doWriteResponse(DefaultHttpBinding.java:332)[143:org.apache.camel.camel-http-common:2.16.3]
at
org.apache.camel.http.common.DefaultHttpBinding.writeResponse(DefaultHttpBinding.java:264)[143:org.apache.camel.camel-http-common:2.16.3]
at
org.apache.camel.component.jetty.CamelContinuationServlet.service(CamelContinuationServlet.java:227)[155:org.apache.camel.camel-jetty-common:2.16.3]
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[54:javax.servlet-api:3.1.0]
at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[117:org.eclipse.jetty.servlet:9.2.14.v20151106]
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)[117:org.eclipse.jetty.servlet:9.2.14.v20151106]
at
org.apache.camel.component.jetty.CamelFilterWrapper.doFilter(CamelFilterWrapper.java:45)[155:org.apache.camel.camel-jetty-common:2.16.3]
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[117:org.eclipse.jetty.servlet:9.2.14.v20151106]
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)[117:org.eclipse.jetty.servlet:9.2.14.v20151106]
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[117:org.eclipse.jetty.servlet:9.2.14.v20151106]
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.Server.handleAsync(Server.java:549)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:318)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[116:org.eclipse.jetty.server:9.2.14.v20151106]
at
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[108:org.eclipse.jetty.io:9
.2.14.v20151106]
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[119:org.eclipse.jetty.util:9.2.14.v20151106]
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[119:org.eclipse.jetty.util:9.2.14.v20151106]
at java.lang.Thread.run(Thread.java:748)[:1.7.0_151]
Caused by: java.nio.BufferOverflowException
at java.nio.Buffer.nextPutIndex(Buffer.java:513)[:1.7.0_151]
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:163)[:1.7.0_151]
at
org.eclipse.jetty.http.HttpGenerator.putSanitisedValue(HttpGenerator.java:1057)[107:org.eclipse.jetty.http:9.2.14.v20151106]
at
org.eclipse.jetty.http.HttpGenerator.putTo(HttpGenerator.java:1079)[107:org.eclipse.jetty.http:9.2.14.v20151106]
at
org.eclipse.jetty.http.HttpGenerator.generateHeaders(HttpGenerator.java:703)[107:org.eclipse.jetty.http:9.2.14.v20151106]
at
org.eclipse.jetty.http.HttpGenerator.generateResponse(HttpGenerator.java:385)[107:org.eclipse.jetty.http:9.2.14.v20151106]
... 33 more
2017-12-19 16:33:02,806 | WARN  | tp466415455-3362 | HttpChannel
          | 119 - org.eclipse.jetty.util - 9.2.14.v20151106 | Could not
send response error 500: java.io.IOException: Response header too large


Regards,
Laurentiu
  

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message