Symptoms: Address already in use: :25565, Failed to bind to port, EADDRINUSE

Possible Causes

  • Another server is using the same port
  • A crashed old process is still running
  • A system service is blocking the port

Step-by-Step Fix

Step 1

Find the process using the port

bash
sudo lsof -i :25565

Step 2

Terminate the old process

bash
sudo kill -9 <PID>

Step 3

Or use a different port

bash
server-port=25566

Step 4

Check every Java process

bash
ps aux | grep java