Fix "**** FAILED TO BIND TO PORT!" on a Minecraft Server

Updated · MCJarHub

Another program — very often a second copy of the same server — already listens on the port, or server-ip in server.properties is set to an address your machine does not have. Stop the other process or change server-port, and leave server-ip empty.

What the error looks like

During start-up the server log shows:

[Server thread/WARN]: **** FAILED TO BIND TO PORT!
[Server thread/WARN]: The exception was: java.net.BindException: Address already in use
[Server thread/WARN]: Perhaps a server is already running on that port?

The wording of the exception tells you which of the two causes you have:

  • Address already in use (Windows adds : bind) — another process is already listening on that port.
  • Cannot assign requested address — server-ip in server.properties is set to an IP address this machine does not have.

Cause 1: the port is already in use

Most often it is an old copy of the same server still running in the background — for example after closing a terminal window, or a second start script. Find out what holds the port (replace 25565 with your server-port):

REM Windows (Command Prompt) — last column is the process ID (PID)
netstat -ano | findstr :25565
tasklist /FI "PID eq 12345"
taskkill /PID 12345 /F

# Linux
sudo ss -ltnp | grep 25565

# macOS (or Linux with lsof installed)
sudo lsof -iTCP:25565 -sTCP:LISTEN

If the process is a java you started earlier, stop it cleanly with the stop command in its console where possible — killing it can lose the last few minutes of world data. If it is a different program, change your server's port instead.

To change the port, edit server.properties and restart:

server-port=25566

Players then connect to your-address:25566. Running several servers on one machine always needs one port per server.

Cause 2: server-ip is set

Leave server-ip= empty unless you really need to listen on one specific network interface. People often put their public IP or their router's IP there — but behind a router the machine only has a local address (like 192.168.x.x), so binding to the public IP fails.

server-ip=

Proxies and networks

With a proxy in front, the proxy and each backend server need different ports. Velocity listens on 25565 by default (bind in velocity.toml), so a backend on the same machine must move to another port, e.g. 25566. BungeeCord and Waterfall use 25577 by default (host in config.yml). The same "address already in use" message appears in a proxy's log when two proxies share a port.

What this error is not

Binding happens entirely on your own machine before any player connects, so router port forwarding, firewalls and your ISP are not the cause of this particular error. They matter afterwards, when friends outside your network cannot join — that is covered in how to make a Minecraft server. For other start-up problems see server jar not opening and how to run a server jar.

FAQ

Is this caused by my router or port forwarding?
No. Binding happens on your own machine before any network traffic; port forwarding only matters for players connecting from the internet after the server started.
Which port does a proxy use?
Velocity listens on 25565 by default and BungeeCord/Waterfall on 25577. If a proxy and a backend run on one machine, give the backend a different server-port.