← Back
java.net.BindException: Address already in use
COAL-002 · Port already in use
Another process is already listening on your Minecraft server's port. How to find what is holding port 25565 and free it, on Windows and on Linux.
What it looks like in the log[Server thread/WARN]: **** FAILED TO BIND TO PORT! [Server thread/WARN]: The exception was: java.net.BindException: Address already in use: bind [Server thread/WARN]: Perhaps a server is already running on that port?
What it means
Only one program at a time can listen on a given TCP port. Something else on this machine already owns port 25565 (or whatever server-port is set to), so the new server process cannot claim it and shuts down immediately. Nine times out of ten the culprit is a previous copy of the same server that never fully exited.
How to fix it
- Look for a leftover server first. Check Task Manager for a
java.exeorjavaw.exeprocess and end it. A window closed with the X button rather than thestopcommand often leaves one running. - Find the owner on Windows: run
netstat -ano | findstr :25565in Command Prompt. The last column is the PID - match it in Task Manager's Details tab. - Find the owner on Linux:
sudo ss -lptn 'sport = :25565'. - Or move the server. Change
server-portinserver.propertiesto something free like 25566, forward the new port, and have players connect withyour-ip:25566.
This is the same underlying situation as COAL-015, reported by a different part of the startup sequence.

