Why This Error : Listen EADDRINUSE on Node.JS
January 12 2016
EADDRINUSE means that the address you are trying to use port number which listen() tries to bind the server,
You need to check the listening event like this,
var http=require('http');
...
...
});
server.on('listening',function(){
console.log(' server is running');
});
server.listen(80);
Other then, kill the existing process and can start your node.js.
Run the below command to get the process id
# ps aux | grep node
# kill -9 PID
# kill -9 PID
Comments (0)