Help plesase! GET http methode don't work on the server

Hello, I have a problem with the GET method. it work on the local but when I put my projet on the server it does’nt work.

I’m working on a project, I need to display an address on the map. To do this, I use the city name, zip code, and address.

I’m trying to retrieve latitude and logitude using an API

When I run the code on the local, the GET method works, I manage to retrieve the latitude and longitude then the markers are displayed on the map.

But when I run the code on the Server it gives me the error below.


my script

com.inductiveautomation.ignition.common.script.JythonExecException
Traceback (most recent call last):
File “function:runAction”, line 20, in runAction
java.io.IOException: java.io.IOException: Unable to GET https://nominatim.openstreetmap.org/search?q=Rue+du+8+Mai+1945+75010+Paris&format=geocodejson

caused by org.python.core.PyException

Traceback (most recent call last):
File “function:runAction”, line 20, in runAction
java.io.IOException: java.io.IOException: Unable to GET https://nominatim.openstreetmap.org/search?q=Rue+du+8+Mai+1945+75010+Paris&format=geocodejson

caused by IOException: Unable to GET https://nominatim.openstreetmap.org/search?q=Rue+du+8+Mai+1945+75010+Paris&format=geocodejson
caused by ConnectException
caused by ConnectException
caused by UnresolvedAddressException

Ignition v8.1.14 (b2022012711)
Java: Azul Systems, Inc. 11.0.13

I hope that address doesnt point to your house xd

The error and your code does not seem to match. Line 20 is commented out

Im guessing it might be because its https while your server is running in http. no idea tho,
Im not having problems getting a response from it on my local machine

1 Like

Yes it work very good on the local. but when I put it on the ignition server, GETmethod don’t work

probably a firewall or security config thing then or something

Unresolved address is a DNS error. Something is squirrely in the server’s DNS setup.

1 Like

As previously mentioned, it is likely that there is a network configuration difference between your server and your dev box. You can potentially eliminate Ignition from the equation if you open a command/terminal window on your server and attempt to ping the map API. EG

ping nominatim.openstreetmap.org

This worked for me from my local dev box and returned:

PING corvallis.nominatim.openstreetmap.org (140.211.167.100): 56 data bytes
64 bytes from 140.211.167.100: icmp_seq=0 ttl=45 time=54.091 ms
64 bytes from 140.211.167.100: icmp_seq=1 ttl=45 time=51.430 ms
64 bytes from 140.211.167.100: icmp_seq=2 ttl=45 time=51.581 ms

If this doesn’t work from your server, then it’s likely to be a firewall/network configuration error either on the server, or perhaps in the networking equipment (switch etc) that the server connects to.