PositiveGuy
PositiveGuy

Reputation: 20252

EADDRINUSE - still can't kill the Node Process

I'm running terminal in webstorm. I try running node --harmony app.js and says my koa app.listen() is already running.

So I try to hunt and see what node processes are running via the command ps aux | grep node

I see a couple results:

myUserName         897   0.0  0.0  3083844    160 s000  T    11:15AM   0:00.32 node --harmony app.js
myUserName        1935   0.0  0.0  2441988    676 s000  S+    1:33PM   0:00.00 grep node

I try to kill 897 by doing a kill 897 or pkill 897 but it is still running. How do I get that to kill!!!??

Upvotes: 11

Views: 8540

Answers (2)

kiran Sp
kiran Sp

Reputation: 153

fuser -k 4060/tcp

where 4060 is the port on which your node server is running.

Upvotes: 4

Samuel
Samuel

Reputation: 17171

kill -9 897

kill command sends a signal to the given process, but unless you use -9 which sends the SIGKILL signal, the process is allowed to attempt to kill itself.

Upvotes: 19

Related Questions