If I run a server with the port 80, and I try to use xmlHTTPrequest i get this error: Error: listen EADDRINUSE
Why is it problem for nodejs, if I want t
Just a head's up, Skype will sometimes listen on port 80 and therefore cause this error if you try to listen on port 80 from Node.js or any other app.
You can turn off that behaviour in Skype by accessing the options and clicking Advanced -> Connection -> Use port 80 (Untick this)
P.S. After making that change, don't forget to restart Skype!
Your application is already running on that port 8080 . Use this code to kill the port and run your code again
sudo lsof -t -i tcp:8080 | xargs kill -9
lsof -i:3000;
kill -9 $(lsof -t -i:3000);
// 3000 is a your port
// This "lsof -i:3000;" command will show PID
kill PID
ex: kill 129393
sudo kill $(sudo lsof -t -i:80)
for force kill
sudo kill -9 $(sudo lsof -t -i:80)
use above cmd to kill particular port and then run your server
What really helped for me was:
killall -9 node
But this will kill a system process.
With
ps ax
you can check if it worked.
You should try killing the process that is listening on port 80.
Killall will kill all the node apps running. You might not want to do that. With this command you can kill only the one app that is listening on a known port.
If using unix try this command:
sudo fuser -k 80/tcp