[
https://issues.apache.org/jira/browse/CAMEL-9070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14993550#comment-14993550
]
Ralf Steppacher edited comment on CAMEL-9070 at 11/6/15 11:46 AM:
------------------------------------------------------------------
I tried to reproduce the issue with a project revision (Karaf 3.0.5, Camel
2.15.2) before I worked around the jetty issue. But could not reproduce the
exact error. Instead I get errors about timed out continuations. Apparently the
backend my proxy route talks to sporadically replies with a 503. This happens
after some hundred requests were placed by my load test (SoapUI).
However, if I use my current setup that replaces the jetty producer with the
http4 producer (Karaf 4.0.2, Camel 2.15.4) in my proxy route, my load test hums
along happily. 10'000 requests and not a hitch. Thus I am not sure the 503
really originates from the backend. I will have to request the logs...
was (Author: ralfsteppacher):
I tried to reproduce the issue with a project revision (Karaf 3.0.5, Camel
2.15.2) before I worked around the jetty issue. But could not reproduce the
exact error. Instead I get errors about timed out continuations. Apparently the
backend my proxy route talks to sporadically replies with a 503. This happens
after some hundred requests were placed by my load test (SoapUI).
However, if I use my current setup that replaces the jetty producer with the
http4 producer (Karaf 4.0.2, Camel 2.15.4) in my proxy route, my load test hums
along happily. 10'000 requests and not a hitch.
> java.lang.IllegalStateException: SENDING => HEADERS
> ---------------------------------------------------
>
> Key: CAMEL-9070
> URL: https://issues.apache.org/jira/browse/CAMEL-9070
> Project: Camel
> Issue Type: Bug
> Components: camel-jetty
> Affects Versions: 2.15.2
> Environment: Karaf 3.0.3
> Reporter: Ralf Steppacher
> Priority: Minor
>
> When using the jetty component in a simple reverse proxy route deployed in
> {{Karaf 3.0.3}} I randomly receive the following Stacktrace:
> {noformat}
> 2015-08-14 10:44:15,931 | WARN | (0x64868d0a)-184 | HttpExchange
> | 117 - org.eclipse.jetty.aggregate.jetty-all-server -
> 8.1.15.v20140411 | | EXCEPTION
> ContentExchange@22d1b2c3=POST//ibb9931:8081/XDS3/repository/repo2#SENDING(1ms)->EXCEPTED(0ms)sent=388ms
> org.apache.camel.CamelExchangeException: JettyClient failed cause by: SENDING
> => HEADERS. Exchange[HttpMessage@0x4b022edc]. Caused by:
> [java.lang.IllegalStateException - SENDING => HEADERS]
> at
> org.apache.camel.component.jetty8.JettyContentExchange8.doTaskCompleted(JettyContentExchange8.java:210)[150:org.apache.camel.camel-jetty8:2.15.2]
> at
> org.apache.camel.component.jetty8.JettyContentExchange8.onException(JettyContentExchange8.java:138)[150:org.apache.camel.camel-jetty8:2.15.2]
> at
> org.apache.camel.component.jetty8.JettyContentExchange8$1.onException(JettyContentExchange8.java:98)[150:org.apache.camel.camel-jetty8:2.15.2]
> at
> org.eclipse.jetty.client.AsyncHttpConnection.handle(AsyncHttpConnection.java:168)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
> at java.lang.Thread.run(Thread.java:745)[:1.7.0_60]
> Caused by: java.lang.IllegalStateException: SENDING => HEADERS
> at
> org.eclipse.jetty.client.HttpExchange.setStatus(HttpExchange.java:370)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
> at
> org.eclipse.jetty.client.AbstractHttpConnection$Handler.startResponse(AbstractHttpConnection.java:297)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
> at
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:489)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
> at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
> at
> org.eclipse.jetty.client.AsyncHttpConnection.handle(AsyncHttpConnection.java:135)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
> ... 5 more
> {noformat}
> I have found (rather old) posts on the web that claim that the behavior is
> related to message size. I am {{POST}}-ing about 6kb of SOAP XML with the
> following headers:
> {noformat}
> POST http://localhost:8080/XDS3/repository/repo2 HTTP/1.1
> Accept-Encoding: gzip,deflate
> Content-Type: multipart/related; type="application/xop+xml";
> start="<[email protected]>"; start-info="application/soap+xml";
> action="urn:ihe:iti:2007:RetrieveDocumentSet";
> boundary="----=_Part_139_1471895036.1439218177147"
> MIME-Version: 1.0
> Content-Length: 6858
> Host: localhost:8080
> Connection: Keep-Alive
> User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
> {noformat}
> The issue pops up at random but not evenly distributed. It either almost
> always happens or hardly ever. Re-installing my bundle or restarting Karaf
> usually triggers a switch between the two scenarios on some machines. On
> others the error is persistent.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)