[
https://issues.apache.org/jira/browse/CAMEL-13004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16774004#comment-16774004
]
Vitor Vianna Ribeiro edited comment on CAMEL-13004 at 2/21/19 11:54 AM:
------------------------------------------------------------------------
Hi Gilvan,
I found the issue.
In my case, I use Wildfly 13 to deploy my Camel Routes.
The problem is on the field Send Buffer inside HTTP Listener Undertow component.
# Configuration⇒Subsystems⇒Web (Undertow)⇒Server ⇒default-server
# Listener⇒HTTP Listener
I change to value to 10000000, and now is working fine.
I don't know if this applies for your scenario, but can help you to solve it.
was (Author: vitorvr):
Hi Gilvan,
I found the issue.
In my case, I use Wildfly 13 to deploy my Camel Routes.
The problem is on the field Send Buffer inside HTTP Listener Undertow component.
# Configuration⇒Subsystems⇒Web (Undertow)⇒Server ⇒default-server
# Listener⇒HTTP Listener
I change to value 10000000, and now is working fine.
I don't know if this applies for your scenario, but can help you to solve it.
> Camel Proxy/Bridge - Premature end of Content-Length delimited message body
> ---------------------------------------------------------------------------
>
> Key: CAMEL-13004
> URL: https://issues.apache.org/jira/browse/CAMEL-13004
> Project: Camel
> Issue Type: Bug
> Components: camel-http4, camel-undertow
> Affects Versions: 2.22.0
> Reporter: Vitor Vianna Ribeiro
> Priority: Minor
>
> I'm using Camel Rest DSL to build endpoints to use as proxies between
> different networks.
> I have created 2 endpoints. Below the code:
> First:
> {code:java}
> restConfiguration().host("localhost").component("undertow").bindingMode(RestBindingMode.off);
> rest("/endpoint?{1param}&{2param}") .get("/") .route().routeId("Ednpoint1")
> .autoStartup(true) .setProperty("uri",
> simple("http4://0.0.0.0:8080/endpoint?1param=${header.1param}&2param=${header.2param}"))
> .setHeader(Exchange.HTTP_METHOD, constant("GET"))
> .removeHeaders("CamelHttp*")
> .toD("${header.uri}").endRest().responseMessage().message("${body}");{code}
>
> Second:
> {code:java}
> restConfiguration().host("localhost").component("undertow").bindingMode(RestBindingMode.off);
> rest("/endpoint?{param1}&{param2}") .get("/") .route().routeId("Endpoint2")
> .autoStartup(true) .setProperty("uri",
> simple("http4://endpoint-destionation/service?dhi=${header.param1}&dhf=${header.param2}"))
> .setHeader(Exchange.HTTP_METHOD, constant("GET")) .removeHeaders("*")
> .toD("${header.uri}").endRest().responseMessage().message("${body}");{code}
>
> I'm currently getting the following error:
> {code:java}
> org.apache.http.ConnectionClosedException: Premature end of Content-Length
> delimited message body (expected: 146541; received: 54482 at
> org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:180)
> at
> org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:137)
> at
> org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:150)
> at org.apache.camel.util.IOHelper.copy(IOHelper.java:219) at
> org.apache.camel.util.IOHelper.copy(IOHelper.java:174) at
> org.apache.camel.util.IOHelper.copy(IOHelper.java:170) at
> org.apache.camel.component.http4.HttpProducer.doExtractResponseBodyAsStream(HttpProducer.java:414)
> at
> org.apache.camel.component.http4.HttpProducer.extractResponseBody(HttpProducer.java:397)
> at
> org.apache.camel.component.http4.HttpProducer.populateResponse(HttpProducer.java:242)
> at
> org.apache.camel.component.http4.HttpProducer.process(HttpProducer.java:203)
> at
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
> at
> org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:178)
> at
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:445)
> at
> org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:160)
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:101) at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97)
> at
> org.apache.camel.component.undertow.UndertowConsumer.handleRequest(UndertowConsumer.java:126)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360) at
> io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) at
> org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at
> org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at
> org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at
> org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> at java.lang.Thread.run(Thread.java:748){code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)