Unhandled error — Node.js


root@yanipra:/var/www/helloHerokuMongoDb# foreman start
11:24:16 web.1  | started with pid 11740
11:24:16 web.1  |
11:24:16 web.1  | events.js:72
11:24:16 web.1  |         throw er; // Unhandled 'error' event
11:24:16 web.1  |               ^
11:24:16 web.1  | Error: listen EADDRINUSE
11:24:16 web.1  |     at errnoException (net.js:904:11)
11:24:16 web.1  |     at Server._listen2 (net.js:1042:14)
11:24:16 web.1  |     at listen (net.js:1064:10)
11:24:16 web.1  |     at Server.listen (net.js:1138:5)
11:24:16 web.1  |     at Function.app.listen (/var/www/helloHerokuMongoDb/node_modules/express/lib/application.js:548:24)
11:24:16 web.1  |     at Object.<anonymous> (/var/www/helloHerokuMongoDb/app.js:36:5)
11:24:16 web.1  |     at Module._compile (module.js:456:26)
11:24:16 web.1  |     at Object.Module._extensions..js (module.js:474:10)
11:24:16 web.1  |     at Module.load (module.js:356:32)
11:24:16 web.1  |     at Function.Module._load (module.js:312:12)
11:24:16 web.1  | exited with code 8
11:24:16 system | sending SIGTERM to all processes

to solve :

search port listen in PID with netstat :

netstat -anp 2>/dev/null| grep :5000

And kill PID on result

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s