how to release localhost from Error: listen EADDRINUSE

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?


Solution 1:

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

Solution 2:

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.