I have encountered many times trying to run a service that use an existing port.
For example, my
jekyll 3.1.6 | Error: Ad dress already in use - bind(2) for 127.0.0.1:4000
This is because my jekyll process somehow wasn’t killed properly, and then I tried to run another process using the same port.
To solve, kill the process that is using the port (eg 4000):
lsof -i :4000 kill -9 <PID>