Skip to main content
8-Gravel
July 8, 2020
Solved

Error while consuming web service:Connection refuse connection failed

  • July 8, 2020
  • 2 replies
  • 2178 views

Hello,

i tried to access this url http://localhost:5555/Devices/
to get json response data but  I am getting below error

 Error executing service Message :: Connect to localhost:5555 [localhost/127.0.0.1] failed: Connection refused (Connection refused) - See Script Error Log for more details.

Capture.PNG
but i can access this url with Postman and get response 

service:
Capture2.PNG

thanks in advance

Best answer by VladimirRosu_116627
You are using localhost as the hostname in both cases. So, is your ThingWorx server installed in the same machine (not VM) as the one from which you're doing the Postman call ?

2 replies

Community Manager
July 15, 2020

Hi @Nour4.

 

Are you passing some credentials in the Postman call that you're not able to pass when accessing the url directly?  Is it possible that you have a firewall rule at the app level that is allowing Postman to succeed?

 

Regards.

 

--Sharon

 

 

19-Tanzanite
July 16, 2020
You are using localhost as the hostname in both cases. So, is your ThingWorx server installed in the same machine (not VM) as the one from which you're doing the Postman call ?