[
https://issues.apache.org/jira/browse/CAMEL-20177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17792983#comment-17792983
]
Claus Ibsen commented on CAMEL-20177:
-------------------------------------
The http client has indeed been upgrade from v4 to v5. Not sure what you do
that causes your problem, but in general it works fine for everyone else.
Mind that some of the TLS/SSL protocol has been removed such as LTS 1.1 as part
of Camel 3 -> 4. But in general your issues is around the http client upgrade
itself.
You can use some of the other http clients, like camel-vertx-http
> http route fails - invalid proxy when none is used
> --------------------------------------------------
>
> Key: CAMEL-20177
> URL: https://issues.apache.org/jira/browse/CAMEL-20177
> Project: Camel
> Issue Type: Bug
> Components: camel-http
> Affects Versions: 4.0.3
> Environment: EL7
> java-latest-openjdk-18.0.2.0.9-1.rolling.el7.x86_64
> Camel 4.0.3 Embedded in ActiveMQ 6.0.0
>
> Reporter: JJ
> Priority: Minor
> Labels: help-wanted
>
> I have a simple {{timer}} route which collects data from a http request.
> However after upgrading to {{camel-4.0.3}} this no longer works, no body is
> fetched and the message is sent to the DLQ. Using {{camel-3.21.1}} it works
> as expected with no errors and the messages body appears on the correct topic
> for consumption.
> {code:xml}
> <route id="solar_pull">
> <from uri="timer:nationalSolar?fixedRate=true&period=300000" />}}
> <to
> uri="https://api.solar.sheffield.ac.uk/pvlive/api/v4/pes/0?httpClient.cookieSpec=ignoreCookies"
> />}}
> <to uri="localAMQ:topic:Solar"/>}}
> </route>
> {code}
> It simply fetches some {{json}} data as shown below;
> {code:java}
> {"data":[[0,"2023-11-27T23:00:00Z",0.0]],"meta":["pes_id","datetime_gmt","generation_mw"]}{code}
> With Camel 4.0.3 the following strange error is logged in full debug mode;
> {{java.lang.IllegalArgumentException: Invalid Proxy}}
> {code:java}
> DEBUG | >>>>
> https://api.solar.sheffield.ac.uk/pvlive/api/v4/pes/0?httpClient.cookieSpec=ignoreCookies
> Exchange[]
> DEBUG | ex-0000000001 preparing request execution
> DEBUG | ex-0000000001 target auth state: UNCHALLENGED
> DEBUG | ex-0000000001 proxy auth state: UNCHALLENGED
> DEBUG | ex-0000000001 acquiring connection with route
> {s}->https://api.solar.sheffield.ac.uk:443
> DEBUG | ex-0000000001 acquiring endpoint (3 MINUTES)
> DEBUG | ex-0000000001 endpoint lease request (3 MINUTES) [route:
> {s}->https://api.solar.sheffield.ac.uk:443][total available: 0; route
> allocated: 0 of 20; total allocated: 0 of 200]
> DEBUG | ex-0000000001 endpoint leased [route:
> {s}->https://api.solar.sheffield.ac.uk:443][total available: 0; route
> allocated: 1 of 20; total allocated: 1 of 200]
> DEBUG | ex-0000000001 acquired ep-0000000001
> DEBUG | ex-0000000001 acquired endpoint ep-0000000001
> DEBUG | ex-0000000001 opening connection
> {s}->https://api.solar.sheffield.ac.uk:443
> DEBUG | ep-0000000001 connecting endpoint (null)
> DEBUG | ep-0000000001 connecting endpoint to
> https://api.solar.sheffield.ac.uk:443 (3 MINUTES)
> DEBUG | api.solar.sheffield.ac.uk resolving remote address
> DEBUG | api.solar.sheffield.ac.uk resolved to
> [api.solar.sheffield.ac.uk/143.167.1.47]
> DEBUG | http-outgoing-0 close connection IMMEDIATE
> DEBUG | ep-0000000001 endpoint closed
> DEBUG | ep-0000000001 discarding endpoint
> DEBUG | ep-0000000001 releasing endpoint
> DEBUG | ep-0000000001 connection is not kept alive
> DEBUG | ep-0000000001 connection released [route:
> {s}->https://api.solar.sheffield.ac.uk:443][total available: 0; route
> allocated: 0 of 20; total allocated: 0 of 200]
> DEBUG | Failed delivery for (MessageId: F2235F0F816E9CF-0000000000000000 on
> ExchangeId: F2235F0F816E9CF-0000000000000000). On delivery attempt: 0 caught:
> java.lang.IllegalArgumentException: Invalid Proxy
> DEBUG | >>>> localAMQ://queue:DLQ-Camel
> Exchange[F2235F0F816E9CF-0000000000000000]{code}
> I've been through the
> [docs|https://camel.apache.org/components/4.0.x/http-component.html] but
> can't see anything obvious as to what's changed. I've also checked the
> [migration|https://camel.apache.org/manual/camel-4-migration-guide.html] doc.
> Have I missed or misunderstood something or have I found a bug?
> What is the correct way to migrate this route to Camel >4 ?
> Appears to be broken in all versions from camel-http-4.0.0-M3.jar and above
--
This message was sent by Atlassian Jira
(v8.20.10#820010)