You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Rajesh Pote (Jira)" <ji...@apache.org> on 2020/04/06 11:39:00 UTC
[jira] [Created] (CAMEL-14849) socketTimeout and connectTimeout
properties are not getting set via URI Options
Rajesh Pote created CAMEL-14849:
-----------------------------------
Summary: socketTimeout and connectTimeout properties are not getting set via URI Options
Key: CAMEL-14849
URL: https://issues.apache.org/jira/browse/CAMEL-14849
Project: Camel
Issue Type: Bug
Components: camel-http
Affects Versions: 2.23.1
Reporter: Rajesh Pote
HI Team,
I am having two issue with camel-http producer.
+*1. socketTimeout and connectTimeout properties are not getting set via URI Options*+. And my request is getting timeout after 2mins by default. i have configure the proprties as mentioned in docs [https://camel.apache.org/components/latest/http-component.html#_http_component_options]
here is the code which used for producer.
*Tried Code:*
ProducerTemplate template = context.createProducerTemplate();ProducerTemplate template = context.createProducerTemplate(); //context.add String out = template.requestBody("http://tor-virgin-om8-pub:5000/restapi/GetSTBDetails?connectTimeout=1000&socketTimeout=5000", null,String.class);
*logs:*
*========================================================*
{{12:15:29.207 [main] DEBUG org.apache.camel.impl.DefaultCamelContext - http://tor-virgin-om8-pub:5000/restapi/GetSTBDetails?connectTimeout=1000&socketTimeout=5000 converted to endpoint: http://tor-virgin-om8-pub:5000/restapi/GetSTBDetails?connectTimeout=1000&socketTimeout=5000 by component: org.apache.camel.component.http.HttpComponent@1e9e725a}}
{{12:15:29.213 [main] DEBUG org.apache.camel.impl.ProducerCache - Adding to producer cache with key: http://tor-virgin-om8-pub:5000/restapi/GetSTBDetails?connectTimeout=1000&socketTimeout=5000 for producer: Producer[http://tor-virgin-om8-pub:5000/restapi/GetSTBDetails?connectTimeout=1000&socketTimeout=5000]}}
{{12:15:29.214 [main] DEBUG org.apache.camel.impl.ProducerCache - >>>> http://tor-virgin-om8-pub:5000/restapi/GetSTBDetails?connectTimeout=1000&socketTimeout=5000 Exchange[]}}
{{12:15:29.237 [main] DEBUG org.apache.camel.component.http.HttpProducer - Executing http GET method: http://tor-virgin-om8-pub:5000/restapi/GetSTBDetails?connectTimeout=1000&socketTimeout=5000}}
{{12:17:47.036 [main] ERROR HttpProducerSOTimeoutTest - Failed=============}}
=========================================================
2. Http Client is retrying automatically on ConnectException which i dont want, so is there way to disable http client retries?
*Logs:*
{{INFO 10:24:31 clip-worker-2 connectivity.ConnectivityAdapterRequest> URL [https://100.10.40.1:9190/test/v1.0/GetSTBDetails?httpMethod=get|https://10.110.4.10:9090/Fmw/STBEquipment/v1.0/GetSTBDetails?httpMethod=get]}}{{INFO 10:26:38 clip-worker-2 org.apache.commons.httpclient.HttpMethodDirector> I/O exception (java.net.ConnectException) caught when processing request: Connection timed out (Connection timed out)}}{{INFO 10:26:38 clip-worker-2 org.apache.commons.httpclient.HttpMethodDirector> Retrying request}}{{INFO 10:28:45 clip-worker-2 org.apache.commons.httpclient.HttpMethodDirector> I/O exception (java.net.ConnectException) caught when processing request: Connection timed out (Connection timed out)}}{{INFO 10:28:45 clip-worker-2 org.apache.commons.httpclient.HttpMethodDirector> Retrying request}}{{INFO 10:30:53 clip-worker-2 org.apache.commons.httpclient.HttpMethodDirector> I/O exception (java.net.ConnectException) caught when processing request: Connection timed out (Connection timed out)}}{{INFO 10:30:53 clip-worker-2 org.apache.commons.httpclient.HttpMethodDirector> Retrying request}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)