I'm trying to start a hello-world
container app that I just build using nodejs on my Mac OS X.
docker run -p 80:80 --name web -d node-hello
343503e8a29ac207c821caa7990373580dd6a1951e1e4936bbf9c71b0eff2213
docker: Error response from daemon: driver failed programming external connectivity on endpoint web (e6035cf3ae4df37f1a96a5a7ed321e6a0ae7ad484c05aae8d7b67f3d86fa3a76): Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error (Failure EADDRINUSE).
I went to the address
I ran this
lsof -i ":80"
and got
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Google 956 bheng 225u IPv6 0x5bed1c283af57fa7 0t0 TCP [2607:f518:15e:9540:3105:c54f:bd3c:14ed]:63120->yul02s04-in-x10.1e100.net:http (ESTABLISHED)
(netstat -an | grep LISTEN | grep 80)
tcp4 0 0 127.0.0.1.4380 *.* LISTEN
tcp46 0 0 *.80 *.* LISTEN
How do I find out what is exactly running on my port 80 right now ?
This /usr/sbin/httpd is listening on port 80, should be Apache server.
You can find out what is running on a specific port by running the command lsof -i with the port number, :<PortNumber> .
Prefix lsof with sudo to see process ids that you don’t own.
sudo lsof -i:80
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With