EADDRINUSE — Address already in use (port 25565)
'java.net.BindException: Address already in use' means the port Minecraft wants to listen on is already claimed by another process. Either a previous server instance didn't exit cleanly, or another program picked up the port. The JVM can't bind two sockets to the same address and port, so it refuses to start. The fix is either killing the old process or switching ports.
Fastest path: paste your crash report into the Crash Doctor — it identifies this pattern and 40+ others automatically. No signup.
How to fix it
- 1
Find what's holding the port
On Linux: 'sudo ss -tlnp | grep 25565' or 'sudo lsof -i :25565'. On Windows: 'netstat -ano | findstr :25565' then look up the PID in Task Manager. The output names the process holding the port — usually a zombie java process from a previous server that didn't shut down cleanly.
- 2
Kill the old process
Linux: 'kill <pid>' (or 'kill -9 <pid>' if it won't die). Windows: 'taskkill /PID <pid> /F'. If you're on a panel, use the panel's 'Force stop' button which sends SIGKILL. Wait 5 seconds and try starting again.
- 3
Change the port in server.properties
If you need two servers running on the same host, set a different server-port in each server.properties (e.g., 25566 for the second). Players connect to host:25566 instead of the default 25565.
- 4
Configure systemd to wait for the port to free
If your server is managed by systemd and the port lingers after a restart, add 'ExecStartPre=/bin/sh -c "until ! ss -tlnp | grep -q :25565; do sleep 1; done"' before ExecStart. Waits until the port is actually free before launching.
Alternative causes
These can produce the same error message — worth ruling out if the steps above don't resolve it.
Two server instances started by the same panel
A misconfigured panel or a race in a deploy script can start two server processes. The first claims 25565; the second fails. Check if there are two java processes in 'ps aux | grep java' on the same server.
Docker port already bound by the host
If you're running Minecraft in Docker, the host may have its own process on 25565, or a previous container didn't stop cleanly and still holds the port binding. 'docker ps -a' shows stopped containers that still own the port.
Frequently asked
Why doesn't the server release the port when it crashes?
A clean shutdown closes the socket. A hard crash (kill -9, power cut, OOM-kill) can leave the socket in TIME_WAIT state for up to 60 seconds while the OS waits for in-flight packets to drain. That's why the port seems stuck even after the process is gone.
Can I force the port to release immediately?
You can't forcibly close a TIME_WAIT socket without OS-level changes (SO_REUSEADDR, tweaking tcp_tw_reuse). The cleanest fix is waiting 60 seconds, or switching to a different port temporarily.
Is it safe to use ports other than 25565?
Yes — Minecraft has no technical preference for 25565, it's just the default. Players connecting to a non-default port must specify it explicitly: 'server.example.com:25566'. SRV DNS records let you hide the port from players.
Want this auto-fixed on your server?
CoalHosting's Minecraft hosting runs the same pattern database against every crash and applies the known fix before your players notice. Free crash diagnosis works on any server, hosted or not.
Related crashes
Failed to save world / Failed to save chunk
Fix Minecraft 'Failed to save world' and 'Failed to save chunk' errors — Minecraft couldn't flush data to disk…
Permission denied / AccessDeniedException
Fix Minecraft server 'Permission denied' crashes — the Java process can't write a file. Usually wrong file own…
Watchdog tick timeout (single server tick took)
Fix Minecraft server watchdog crashes — a tick took longer than 60s and the server killed itself. Usually a he…
Last reviewed 2026-06-15. If a step is wrong or out of date, tell us — we'll fix the article and the auto-pattern at the same time.