how to release localhost from Error: listen EADDRINUSE


Question

i am testing a server written in nodejs on windows 7 and when i try to run the tester in the command line i get the following error

Error: listen EADDRINUSE
at errnoException (net.js:614:11)
at Array.0 (net.js:704:26)
at EventEmitter._tickCallback (node.js:192:40)

how can I fix it without rebooting?

1
112
12/18/2011 6:50:12 PM

Accepted Answer

It means the address you are trying to bind the server to is in use. Try another port or close the program using that port.

96
12/18/2011 7:44:21 PM

Run:

ps -ax | grep node

You'll get something like:

60778 ??         0:00.62 /usr/local/bin/node abc.js

Then do:

kill -9 60778

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon