REST API "Unable to connect to the remote server"
Question

Hi everyone,


I am trying to consume an API, but I don't have any response in Outsystems. I've tried it in Postman and it works fine.


The response I get in Outsystems:


The same API in Postman:


The link to the API:

https://servicodados.ibge.gov.br/api/v1/localidades/estados/{UF}/municipios


And the value tested is 33




Champion

Hi,

tried to use your API & it took 21 seconds on Postman & browser too.

The error you are getting because there's a Request Timeout defined & in REST API; Like in Mobile Application, you can set the value of Server request Time..

because your Server is taking more than expected time seconds thus the Outsystems request is getting Timeout.

Try to bring the response in less than 10 seconds.. atleast


assif_tiger wrote:

Hi,

tried to use your API & it took 21 seconds on Postman & browser too.

The error you are getting because there's a Request Timeout defined & in REST API; Like in Mobile Application, you can set the value of Server request Time..

because your Server is taking more than expected time seconds thus the Outsystems request is getting Timeout.

Try to bring the response in less than 10 seconds.. atleast


Hi Assif,


But isn't the default timeout 100 seconds?


 



I'm having the same problem! :(

Hi,

I'm having the same problem. Same endpoint, same input, same header and in one i have an error and in the other i don't.

In Postman it works with no problem, but in ServiceStudio I have the "Unable to connect to the remote server" error.

Anyone have solved this problem?

Thanks in advance.

Nivaldo Pereira wrote:

Hi,

I'm having the same problem. Same endpoint, same input, same header and in one i have an error and in the other i don't.

In Postman it works with no problem, but in ServiceStudio I have the "Unable to connect to the remote server" error.

Anyone have solved this problem?

Thanks in advance.

Hi Nivaldo and Tarek, please check with the Network admin about the securities rules from your server, sometimes is the server blocking the request bcuz some rules they may have.

Cheers

Carlos Lessa


Carlos Lessa wrote:

Nivaldo Pereira wrote:

Hi,

I'm having the same problem. Same endpoint, same input, same header and in one i have an error and in the other i don't.

In Postman it works with no problem, but in ServiceStudio I have the "Unable to connect to the remote server" error.

Anyone have solved this problem?

Thanks in advance.

Hi Nivaldo and Tarek, please check with the Network admin about the securities rules from your server, sometimes is the server blocking the request bcuz some rules they may have.

Cheers

Carlos Lessa


Hi Carlos,

for me that was exactly the situation and it was solved.

Thanks :)


Nivaldo Pereira wrote:

Carlos Lessa wrote:

Nivaldo Pereira wrote:

Hi,

I'm having the same problem. Same endpoint, same input, same header and in one i have an error and in the other i don't.

In Postman it works with no problem, but in ServiceStudio I have the "Unable to connect to the remote server" error.

Anyone have solved this problem?

Thanks in advance.

Hi Nivaldo and Tarek, please check with the Network admin about the securities rules from your server, sometimes is the server blocking the request bcuz some rules they may have.

Cheers

Carlos Lessa


Hi Carlos,

for me that was exactly the situation and it was solved.

Thanks :)


Good I could help you, Bro, now you should invite me for lunch next time I'm in the city :)

Let's see if Tarek also manage to solve



I just wondering what is different, calling from Postman and ServiceStudio. If we are using the Postman, no need to check with the security rules. Mmmmm...

Hi!!
Would you please be so kind to share what kind of security rules people added to the server that made this error happen? And what they changed to fix it?
Because I'm facing the same issue and people from the datacenter say they didn't do anything different and now I need to investigate what they could have changed (because before it was working normally!) and perhaps ask them explicitly to check "this and this".

Thank you in advance for your help!

mvp_badge
MVP

Hi Nivaldo,

I have just tried consuming this REST API Method in my Personal Environment and it is working as expected. Are you also trying to consume it from your PE or from another environment?

Regards,

Nordin

Nordin Ahdi wrote:

Hi Nivaldo,

I have just tried consuming this REST API Method in my Personal Environment and it is working as expected. Are you also trying to consume it from your PE or from another environment?

Regards,

Nordin

Hi Nordin,

sorry, when I said same endpoint I was talking about the endpoint I’m using being the same between Servicestudio and Postman.


Regards,


mvp_badge
MVP

Nivaldo Pereira wrote:

Hi Nordin,

sorry, when I said same endpoint I was talking about the endpoint I’m using being the same between Servicestudio and Postman.


Regards,

That's ok, I misunderstood :).

Like Carlos said, it is probably related to fact that something is blocking your application server from accessing that endpoint. 

One thing you can do is ask a server admin to open up a browser on the application server and try and access that endpoint from there. That could shed some more light on what the issue might be.

Regards,

Nordin


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.