Five Stars

REST Job Fails on Linux, but not on app or Windows .bat

I have a simple REST job developed to make a get call and just output the data to console log. It works in the studio app and if I build the job and run the .bat file in windows it works just the same. However, when I run the .sh file in Linux the job makes the REST call, but comes back with a "Connect timed out" error. I am not sure why the job is timing out in Linux and not in other systems.

 

As a point of troubleshooting I can use curl to make the same rest call from the Linux OS and the data comes back just fine and very quickly. I have isolated this to the job itself as being the problem. I have poked around with other options on the job resulting in no changes in the error.

 

I can reproduce this error in windows if I change the URL from https to http (probably because this REST service does not allow http calls).

 

This is preventing us from running any outbound REST calls from our job server and we are dead in the water.

1 ACCEPTED SOLUTION

Accepted Solutions
Five Stars

Re: REST Job Fails on Linux, but not on app or Windows .bat

I was able to solve this issue. Considering I could get it to work at the OS layer, but not on the java runtime I headed down this route. I discovered the java JVM does not accept the OS proxy settings by default. I was able to modify the net.properties file to allow the system proxies to be used by the JVM and fixed the problem with the job running on linux.

3 REPLIES
Community Manager

Re: REST Job Fails on Linux, but not on app or Windows .bat

Hi
It sounds like a network issue, make sure you are able to access the rest server from your Linux server where the job is executed. You can make a testing to call the rest web service on browser or other rest client tool such as postman from your Linux OS.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Five Stars

Re: REST Job Fails on Linux, but not on app or Windows .bat

In my original post I stated I can successfully connect and retrieve data from the REST service via curl on the same Linux server. So yes, the Linux server can connect successfully to the REST service from the Linux server.

 

Jason

Five Stars

Re: REST Job Fails on Linux, but not on app or Windows .bat

I was able to solve this issue. Considering I could get it to work at the OS layer, but not on the java runtime I headed down this route. I discovered the java JVM does not accept the OS proxy settings by default. I was able to modify the net.properties file to allow the system proxies to be used by the JVM and fixed the problem with the job running on linux.