how to release localhost from Error: listen EADDRINUSE

adam picture adam · Dec 18, 2011 · Viewed 223.7k times · Source

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?

Answer

Komposr picture Komposr · Jul 21, 2013

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