Dhiru · dev watch
What's running on port 8080 on Mac, and how to stop it
Usually: Spring Boot, Tomcat, Vue CLI, webpack-dev-server and many Docker containers use 8080.
See what's on port 8080
Open Terminal and run:
lsof -nP -iTCP:8080 -sTCP:LISTEN
The first column is the app, the second its PID (process ID).
Stop it
kill <PID>
If it's still listed a few seconds later, use kill -9 <PID>. Or stop whatever is on 8080 in one go:
kill $(lsof -t -iTCP:8080 -sTCP:LISTEN)
If lsof shows com.docker or a VM process, stop the container (docker ps, then docker stop <id>) rather than killing Docker itself.
Other ports: 3000, 3001, 3306, 4000, 4200, 4321, 5000, 5173, 5432, 5555, 6006, 6379, 7000, 8000, 8081, 8787, 8888, 9000, 9229, 27017. All at once: see everything that's listening.