Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
jasonatunr
Contributor III
Contributor III

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.

Labels (3)
1 Solution

Accepted Solutions
jasonatunr
Contributor III
Contributor III
Author

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.

View solution in original post

4 Replies
Anonymous
Not applicable

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
jasonatunr
Contributor III
Contributor III
Author

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

jasonatunr
Contributor III
Contributor III
Author

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.

cmbalderrama
Contributor
Contributor

Hello,

Did you do anything else to solve this?

I'm having the exact same issue. I have a job with a tRESTClient that is working fine from the studio and when exported and runned in windows, but when I run it from a linux server I get connection timeout. 
I tried what you said and went to the net.properties in my $JAVA_PATH/lib and change the java.net.usesSystemProxies from false to true. But I still get the same error. Do I need to do anything else? or do you have any idea what else could it be?

Thanks!