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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Alpha549
Creator II
Creator II

Call my API from another computer

Hello everyone,

I deployed a JAR REST API. It works when I use curl http://localhost:8040/services/myservice

But, when I check this URL from another computer (replacing localhost by the real IP address), I get a timeout exception.

Did someone encounter this problem ?

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hello,

it's a network issue, could you please check if there is firewall is running in the runtime computer? if yes,

please try to disable the firewall or open the 8040 port by the below command like

#sudo firewall-cmd --permanent --zone=public --add-port=8040/tcp

#firewall-cmd --reload

View solution in original post

6 Replies
Anonymous
Not applicable

Hello Customer,

please try to enable the remote access for the runtime by

Open the <runtime home>/etc/org.ops4j.pax.web.cfg file to edit it.

add the below line:

org.ops4j.pax.web.listening.addresses=0.0.0.0

 

then restart the runtime

 

please refer to the document in https://help.talend.com/r/en-US/Cloud/remote-engine-user-guide-linux/enabling-remote-access-using-http-optional

Alpha549
Creator II
Creator II
Author

Hello @Aiming Chen​ 

I added the line to the file,

 

0695b00000SrJGGAA3.png 

but nothing changed.

 

From another computer on the same network, when I run http://serveripaddress:8040/services/ or http://serveripaddress:8040/services/myservice from a browser (or Postman), I get a timeout error. I would like to be able to request my API from another machine.

Anonymous
Not applicable

hello,

could you please check if there is a network issue between the 2 computers by try to run the below command

telnet <ip> 8040

Alpha549
Creator II
Creator II
Author

Hello @Aiming Chen​ ,

 

Here is the result :

 

0695b00000SrQdlAAF.png 

Also, on the targeted server, when I run netstat -paunt, I get this for 8040 :

 

0695b00000SrQdqAAF.png 

First column is local address, second is distant address, and last is state.

 

So it could be a network problem ?

Anonymous
Not applicable

Hello,

it's a network issue, could you please check if there is firewall is running in the runtime computer? if yes,

please try to disable the firewall or open the 8040 port by the below command like

#sudo firewall-cmd --permanent --zone=public --add-port=8040/tcp

#firewall-cmd --reload

Alpha549
Creator II
Creator II
Author

@Aiming Chen​ ,

 

It works now !

I'll check the firewall after each installation.

 

Thank you a lot achen !