Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am calling an API from my AWS TAC environment using a tRESTClient and simply attempting to display the results via a tLogRow. The error below is displaying 2 issues: 1) PhaseInterceptorChain 2) SocketTimeoutIssue. I am unsure which issue is the true errror and the PhaseInterceptorChain I do not know a current solution. In addition, in the Advanced Settings of tRESTClient I find to increase timeout but that only applies when running in Local Studio. Has anyone else encountered this issue before with tRESTClient?
[WARN ]: org.apache.cxf.phase.PhaseInterceptorChain - Interceptor for {API_URL}tRESTClient has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.jaxrs.client.AbstractClient.doRunInterceptorChain(AbstractClient.java:666)
at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1034)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:892)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:863)
at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:426)
at org.apache.cxf.jaxrs.client.WebClient.get(WebClient.java:609)
at ge_aviation.em_ppm_api_test_0_1.EM_PPM_API_test.tRESTClient_1Process(EM_PPM_API_test.java:1663)
at ge_aviation.em_ppm_api_test_0_1.EM_PPM_API_test.runJobInTOS(EM_PPM_API_test.java:2235)
at ge_aviation.em_ppm_api_test_0_1.EM_PPM_API_test.main(EM_PPM_API_test.java:2034)
Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking API_URL: connect timed out
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1377)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1361)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
... 10 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.Socket.connect(Socket.java:589)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient$1.run(HttpClient.java:515)
at sun.net.www.http.HttpClient$1.run(HttpClient.java:513)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.http.HttpClient.privilegedOpenServer(HttpClient.java:512)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:553)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConne...)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1199)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.jav...)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:347)
at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.getResponseCode(URLConnectionHTTPConduit.java:332)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1578)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1607)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1551)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348)
... 13 more
Exception in component tRESTClient_1
Hello,
Please check do you have configured "Receive timeout" setting in tRESTClient configuration. What value is configured there?
Best regards
Sabrina
I'm sorry @Xiaodi Shi , but how exactly do we configure those Conenction/receive timeout values if we're not using Studio, but only running from shell script? This should available in any .cgf or properties at least so we could manage! That is the thing everbody is looking for: what is exaclty "Doc for Runtime"? I see no .cfg on my Talend RunPath whatsoever :S
@Richard Hall , please can anyone provide help on this topic? It seems very frequently asked and I see no updates on this ...
Thank you in advance.
Unless you are running this in an ESB Runtime, the timeouts within the components will work. Even if you are running from a shell script (having built your job in a zip file from within the Studio), these parameters will work.
The Doc for Runtime comment is talking about the Talend Runtime documentation if you are running a tRestClient component from a web service or a route inside a Talend Runtime.
So, this means that if I'm running tRestClient component through shell script, those same timeout settings on Studio will work as well when I'm running the job script?
Sorry, I don't understand the last paragraph about Talend Runtime Documentation: In my case, that doesn't apply, is that it?
Hello,
Sorry for late update.
The timeout setting in studio still work when you export this job script and run it outside studio.
For Talend ESB Runtime (based on Apache Karaf) product, it is an execution container in which you can deploy and execute all your Jobs stored on your Git or SVN repository.
On Talend Runtime we use the 'standard' CXF-Conduit File to specific these parameters. Some more information can be found here: TalendHelpCenter: HTTP Conduit OSGi Configuration Parameters
Hope it is clear for you.
Best regards
Sabrina