Hi Thanks for sharing the solution.
If you desire then you are welcome to add a new section / note on the camel-cxf documentation page about this problem and how to solve it with those JVM parameters. There is an "edit this page" button in the bottom of this page https://camel.apache.org/components/latest/cxf-component.html On Sat, Aug 28, 2021 at 12:11 AM Shenavai, Manuel <manuel.shena...@sap.com.invalid> wrote: > > Hi all, > > I got some solution from the CXF community. The solution is to configure > following JVM system properties: > -Dsun.net.client.defaultReadTimeout=60000 > -Dsun.net.client.defaultConnectTimeout=30000 > > Best regards, > Manuel > > From: Shenavai, Manuel > Sent: Mittwoch, 11. August 2021 17:34 > To: dev@camel.apache.org > Subject: External WSDLS and connection/read timeouts > > Hi everyone, > > we are using Camel CXF and found the following problem: > It can happen that a route is trying to start for an infinite amount of time > due to missing response from WSDL endpoint. > > Setup: > A CXF endpoint that is using an external WSDL (i.e. > wsdlURL=http://someHost/test/wsdl) > The WSDL endpoint that is not responding > > Test: > I attached a sample app to this mail. To start the application, start > DemoApplication.java. It will start a camel route containing a CXF endpoint. > The CXF endpoint in the route tries to read an external WSDL. The endpoint > for this WSDL is doing a 15 minute sleep before responding (implemented in > RouteController). The conduit is configured with 100ms timeouts for > connection- and readtimeout > > The application will fail to start if the route can not be started. Since the > WSDL can't be fetched within the 100ms timeout, I would expect the > app-startup to fail at least within 1 minute. However the startup seems to go > on for an infinite amount of time. > > > I did some debugging and found several requests are done for the WSDL with > different timeouts (in this order): > > > 1. org.apache.cxf.transport.http.URLConnectionHTTPConduit:134 > > * connectionTimeout 100 ms > * readTimeout 100 ms > * timeout-values are taken from conduit > > > 1. org.apache.cxf.resource.URIResolver:282 > > * connectionTimeout 30 seconds > * readTimeout 60 seconds > * hardcoded values > > > 1. org.springframework.core.io.AbstractFileResolvingResource:60 > > * connectionTimeout 0 //infinite waiting > * readTimeout 0 //infinite waiting > * no explicit timeouts are set > > Our main problem here is the last request that has no timeout configured at > all. Is there any way to prevent this infinite waiting? Should I create a > ticket for this problem? > > Thanks in advance > Best regards, > Manuel -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2