I have the same problem and I have Cisco AnyConnect installed, which the answer on https://apple.stackexchange.com/questions/66158/unkown-process-listening-at-port-8080 indicates could be the problem. I decided to change the port I was using instead of trying to get rid of the AnyConnect requirement so I can't verify that as a solution, but it's something to try.
Close port 8080 on Mavericks
-
04-07-2023 - |
Frage
I'm attempting to run Vagrantpress, which be default forwards the VM port 80 to the host port 8080. However, it reports that another application is using port 8080 and fails to boot.
Looking around, it seems that using something like lsof | grep :8080
should list the application using the port. However, that command returns empty.
Using Mavericks' Network Utility > Port Scan I get this:
Port Scan has started…
Port Scanning host: 127.0.0.1
Open TCP Port: 80 http
Open TCP Port: 631 ipp
Open TCP Port: 1023
Open TCP Port: 3128 ndl-aas
Open TCP Port: 5001 commplex-link
Open TCP Port: 5003 fmpro-internal
Open TCP Port: 5432 postgresql
Open TCP Port: 8080 http-alt
Open TCP Port: 20559
Open TCP Port: 29754
Open TCP Port: 49524
Open TCP Port: 49525
Port Scan has completed…
But I can't figure out how to close http-alt so that the port can be used by another application.
Lösung
Andere Tipps
You should run lsof -i :8080
instead of lsof | grep :8080
, or netstat -nap | grep :8080
(You may need to change the options on OS X as it is BSD), get the PID of the process and terminate / kill it.
If you just want to work around the issue, use auto_correct: true
in the port forward block, for example
Vagrant.configure("2") do |config|
config.vm.network "forwarded_port", guest: 80, host: 8080,
auto_correct: true
end
and do a vagrant reload
.