`bind: Address already in use` when restarting a service.
BeginnerTroubleshootingConnectivity: refused, timed out, no route
Answer
Likely causes → Old process still running, another service owns the port, or the listening socket is lingering and the app doesn't set SO_REUSEADDR.
Diagnose →
sudo ss -ltnp 'sport = :8080'
sudo lsof -i :8080
Fix → Stop the old process or change the port. In your own code set SO_REUSEADDR on listening sockets.
Prevent → Use systemd with proper ExecStop and avoid kill -9, which leaves orphaned children holding sockets.
More on Connectivity: refused, timed out, no route
`curl: (7) Failed to connect to 10.0.2.15 port 8080: Connection refused`Beginner`curl: (28) Failed to connect to api.internal port 443 after 130001 ms: Connection timed out`Beginner`ssh: connect to host 10.1.4.20 port 22: No route to host`BeginnerService works with `curl localhost:3000` on the box but times out from other hosts.Beginner`ping` works but `curl` to port 80 on the same host times out.Beginner`curl` to a public site works, but `ping 8.8.8.8` shows 100% packet loss.Beginner