Finding process by open port on OSX
Sometimes when node dies on the CLI it doesn't actually kill the process. Attempting to run it again results in an Error: listen EADDRINUSE
error.
To find the id of the rouge processes on OSX, the line found http://juretta.com/log/2007/08/08/list_open_ports_on_your_machine_mac_os_x_/ is what you need:
sudo lsof -i -P | grep -i "listen"
Then just kill
the pid
of the offending process and away you go.
Written by Cayley Humphries
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Node
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#