I am not sure but I see this message: Error: connect ECONNREFUSED

I am new and reading through the documents to better understand postman. Anyway, I am following the instructions of a exercise which seemed simple, but it is not going accordingly.

This is the error that I do not comprehend- Error: connect ECONNREFUSED

What do I need to review? What can it be missing?

I was trying to send the request but as you know by now that message appeared.

I have being reading to see what could I do but like I said I am fairly new and I am trying to reach out to have an Idea of what I need or miss.


1 Like

Hi @docking-module-part6

There are a few existing threads you could check;

1 Like

As mentioned, check those previous requests, but this essentially means that it can’t find the service on your local machine. Postman is not able to hit the end point.

The site doesn’t appear to be HTTPS so that rules out SSL settings.

First thing is to confirm that the web application is up and running and can be accessed by a browser?

8080 is not a standard port, and some companies may block this through the Windows firewall. (I know mine does). So, check your local firewall settings (or is it possible to restart the app and get it to use the standard http port 80).

When checking the firewall, it might be that access is allowed from a browser but not desktop apps (as it looks like you are using the desktop client). So that is worth checking as well.

1 Like

Thanks a lot, I was even checking that there were no typos or so in my files.
But I will have a closer look at what you just suggested. My tutor could not help decipher what seemed to be the problem.

First thing to confirm is the API\webservice is up and running on your local machine.

I’m assuming that the tutor has given you an application that you’ve complied and started. (As it looks like you have visual studio up and running).

I’m going to take a guess and suspect its some sort of node.js application as that is quite popular for training.

Did the application compile ok, and have you started it. Did you get a server started\ready status?

If the application appears to have started ok.

Client on Send on the failing request in Postman, and then look at the console.log which should show you the raw request that was submitted.

Copy and paste the raw request into your web browser and see if this works.

or just enter http://localhost:8080 and see if that responds with anything (to see if a web service is listening on that port).

Can’t guarantee that this will work though as the web service might not have a default page.

1 Like

Exactly, it is a node.js API. Anyhow, I I think it is not running (I can not prove it since my browser sends me a message to check my firewall and it already had permission).
Question: can I see with the command line if it is up and running?
User-Agent: PostmanRuntime/7.29.2
The content below is content from the console:
Accept: /

Postman-Token: 949801ed-0834-4ff3-8403-5158147c35d9

Host: localhost:8080

Accept-Encoding: gzip, deflate, br

Connection: keep-alive
Do you know what it means? I was looking at keep-alive anyhow I am not so sure to understand hehe

In my command line it does say: Your app is listening to port 8080.
:thinking: curious what others think

How about the status in Visual Studio when you start the app?

I’m assuming you are starting the app directly from Visual Studio using Node Package Manager (NPM.

npm run *appname*

You should get something like…

ready - started server on, url: http://localhost:8080
event - compiled client and server successfully in xxx ms (xxx modules)

Do you get that success message?


I actually used the command line and started node, but I think what I did there was .load the file (which might be different? :thinking: ).

I tried what you mentioned but it came with an error as a response. I will look more into it to see what I can find, anyhow much appreciate your tips!

Doesn’t your trainer have detailed instructions on how to install and run the app.

This sounds like it should be with your training provider to support you in installing the app and confirming its running.

I appreciate that candidates may have all sorts of setup’s on their devices, but in general, the training providers usually know how the app is built, and how it should be started (and how to check if its running).

Usually, you have to clone the code from a repository (Git clone). This can be done from within Visual Studio or VS Code but you need to have Git installed.

Install NPM from the command line and confirm the version number is compatible with the app.
Compile the app. (“NPM install” from within the source folder).
If there are no errors in the compile, you can then run the app (NPM run).

This is similar to what I would expect to see in the training instructions.

Might also be worth checking if the app requires a certain version of node.

I knew I missed a step. This hopefully should be flagged when you try and compile the app.

Thanks guys for all info! The small issue I have is that it is very straightforward how it needs to be installed. But since it is not being as the regular scenario that is why I am trying to reach out. hehe my tutor has not reached out as well.
But thanks a lot for brainstorming solutions or observations

I believe I have the latest one

Might be worth considering earlier versions. I think the latest is 18 but I have needed to downgrade to earlier versions depending on the applications I’m working with.

@docking-module-part6 Did you find a solution to this error? I am experiencing the same exact error in Postman. Everything works fine and the application is connected to the database instance but it is still throwing this error when I try to send a POST request to the server.
I will appreciate any help.

In my case yes, I unistalled my modules. And somehow it work once I reinstalled everything I had in my API

You mean the all the modules that you used?

Exactly. That is what it worked.