To find the process id (PID) associated with the port ⇒ lsof -i tcp:3000 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME node 44475 chen5 31u IPv4 0x8b1721168764e4bf 0t0 TCP *:strexec-s (LISTEN) You know the process is occupying a particular port on your machine or server. In order to do that, you need to find the process id (PID) of the process. When this EADDRINUSE issue has already happened, in order to resolve it, you need to kill the process manually. On crash, do process.on('uncaughtException'.The proper fix for the application would be It is only called when the event loop ends, and since server.close() sort of ends the event loop (it still has to wait for currently running stacks here and there) it makes no sense to put that inside the exit event. ) isn't called when the process crashes or is killed. ![]() Listen EADDRINUSE: address already in use The cause behind this issue
0 Comments
Leave a Reply. |