← Back to all fixes

Port already in use — cannot start service

The Issue

Starting nginx/node/app fails with "address already in use" for port 80 or 3000.

Root Cause

Another process is already listening on that port. Could be a zombie process, a previous instance that did not clean up, or a conflicting service.

How to Fix
  1. Find what is using the port: `sudo ss -tlnp | grep :3000`
  2. Or: `sudo lsof -i :3000`
  3. Kill the conflicting process: `sudo kill -9 <pid>`
  4. If it is a systemd service: `sudo systemctl stop <service-name>`
  5. For nginx: check if another nginx instance is already running: `ps aux | grep nginx`