Question

net::ERR_CONNECTION_REFUSED

Wherever I try to access my Node.js application on my Droplet at http://161.35.86.63/, I keep getting this error back:

net::ERR_CONNECTION_REFUSED

Where do you think I’m making a mistake?

Subscribe
Share

Hey @hakkigokdere,

Could you share some more context on your setup? How are you running the Node.js application?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @hakkigokdere,

When you open load a website/ip of your server by default your server tries to use port 80 or 443 depending on the protocol you are using http/https. If nothing is listening on that port you’ll get a ERR_CONNECTION_REFUSED.

My guess would be that you have Node running on another port. To check which port this is SSH to your droplet

ssh root@YourDropletIP

Once you have SSHed, run the following command :

netstat -tulpen

It will output information about all services currently running and listening to a port. Find Node and check the port, most probably it will be 3000(just a guess). Once you see the port, let’s say it’s 3000, you can open load it via the browser like http://161.35.86.63:3000 and you’ll get your content.

Regards, KDSys