Report this

What is the reason for this report?

EADDRINUSE :::3000 error - how do i fix this?

Posted on June 29, 2017

If I try to do “node <script” i am presented with this error log: Error: listen EADDRINUSE :::3000 at Object.exports._errnoException (util.js:1026:11) at exports._exceptionWithHostPort (util.js:1049:20) at Server.setupListenHandle [as _listen2] (net.js:1305:14) at listenInCluster (net.js:1353:12) at Server.listen (net.js:1453:7) at Server.listen.Server.attach (/home/Bot/node_modules/socket.io/lib/index.js:237:9) at Timeout._onTimeout (/home/Bot/site.js:1005:29) at ontimeout (timers.js:488:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:283:5) code: ‘EADDRINUSE’, errno: ‘EADDRINUSE’, syscall: ‘listen’, address: ‘::’, port: 3000 }

anyone know how to fix?



This textbox defaults to using Markdown to format your 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.

@k0ala

Okay, those configurations doesn’t seem to do anything and it doesn’t match the ports the services are listening on.

So you’re only interested in running a Node.js application ?

May I recommend that you start over by reinstalling the server, following this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04

Otherwise you could start a droplet using the One-Click App, which would give you a pre-installed Node.js with Nginx (I think it comes with, but might be Apache).

just power off the droplet by sudo poweroff and then switch the power on using control panel.

@k0ala

That’s good you have backup - very important.

You shouldn’t need to install anything - except if you use non-standard Node modules.

Is it your own code or is it a project you have downloaded? If it’s your own code, then you need to post it in www.pastebin.com so we can have a look at the configuration, because it seems like it’s not configured correctly. If it’s a project, which and from where have you downloaded it?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.