Connection refused (Connection refused) when posting to http://localhost:8000/

gabrielOliv
Tera Contributor

Hi There, My requirement is to interact(CRUD) with local server(installed on my local windows machine) with ServiceNow instance through REST calls.

What I Did:

  • Installed Mid Server on my local machine where my server is running, then started the MidServer with my SNOW instance credentials which worked fine.
  • On SNOW instance validated the same in Mid Server and validated in Credentials module.
  • Also successfully tested and fetched (GET) data with Outbound Rest Message call from my local server.
  • The MID server is specified in the REST API script.

    gabrielOliv_0-1712954212830.png

    gabrielOliv_1-1712954249827.pnggabrielOliv_2-1712954284139.png

     

     

    gabrielOliv_3-1712954298521.png

     

What I want:

I have written a workflow which does CRUD operation on my server and when I am trying to connect through my module(workflow) it fails to connect to my server and does nothing and gives below error:

 java.net.ConnectException: Connection refused (Connection refused) when posting to <REST>

 

I am new to SNOW and would like to know do I need any further configuration in order to make this connectivity work for my modules.

 

Note: I tried same without MidServer by installing my server on GCP and using that GCP Public IP in SNOW and which worked fine. So my workflow is fine.

 

Please let me know if you need any other clarification. 

3 REPLIES 3

Allen Andreas
Administrator
Administrator

Hi,

Can you check your port? In your title you mention 8080, but in your screenshots it's 8000. I believe that's the problem as commonly it's 80 or 8080?

For example:

http - port: 80, 8080
https - ports: 443, 8443

Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Sorry. It was a typing error.
My application is on port 8000

Did you ever find a fix for this issue?