“FAILED TO BIND TO PORT” and java.net.BindException on a Minecraft server: what is already holding the port
The server never got its socket. Something else already holds the address it asked for — another copy of the server, a mod with its own listener, or a server-ip line pointing at an address this machine does not have. The message names the port but not the holder, and that is the whole search: find what is on it, or find out why the address is wrong.
What the error means
A TCP listener owns one address and port pair at a time. Minecraft asks the operating system for the address in server-ip on the port in server-port; if anything already holds that pair the kernel refuses, Java raises java.net.BindException, and the server prints its own banner and exits. Nothing loaded, nothing generated, the world is untouched.
Two different failures print the same family of message, and telling them apart is most of the fix. Either the port is genuinely occupied, or the ADDRESS is not one this machine can bind at all — which produces the same exception and sends people hunting for a process that was never there.
The wordings
| What the log says | What it means |
|---|---|
| FAILED TO BIND TO PORT! | The server's own banner, printed immediately above the exception. It is followed by the port it tried. |
| Perhaps a server is already running on that port? | The vanilla hint on the next line. It is a guess, not a diagnosis — an unbindable server-ip prints it too. |
| java.net.BindException: Address already in use | Something else holds that address and port. Find the holder. |
| java.net.BindException: Cannot assign requested address | The ADDRESS does not exist on this machine. This is the server-ip case, and no process is holding anything. |
Find what is holding the port
On a machine you control, ask the operating system rather than guessing. On Linux, ss -ltnp | grep 25565 prints the listening socket and the process that owns it; on Windows, netstat -ano | findstr :25565 gives a PID you look up in Task Manager. Replace 25565 with the port your log actually named.
- A previous run of the same server that never exited. This is the common one: a stop that timed out leaves the java process alive, holding the port, while the panel or script starts a second copy.
- A second server configured on the same port. Two instances on one machine need two ports; only the first to start gets one.
- A mod with its own listener — voice chat, a web map, a metrics endpoint, an RCON-style console — configured onto the game's port instead of its own.
- Query enabled on the same port. Minecraft's query listener is UDP on query.port, and query.port normally equals server-port, so a UDP mod pointed there collides with the game itself.
- Nothing at all — the port is free and the address is wrong. Go to the next section.
When the address is the problem, not the port
server-ip in server.properties tells the server which local interface to bind. Left EMPTY — which is the correct value for almost every server — it binds all interfaces and works wherever the machine is. Filled in with an address the machine does not have, the bind fails every time with no process to find.
This is the failure that survives a move. A world folder copied from another host, another machine, or a different node carries that host's IP inside it, and the address that was right there is meaningless here. The symptom is a server that booted fine yesterday and refuses on a machine that is otherwise idle.
- Clear server-ip entirely (server-ip= with nothing after it) unless you specifically need to bind one interface.
- server-ip is not your public address. Setting it to the address players connect to is a common and broken guess.
- Changing the PORT players use is a DNS/SRV or port-forward question, not a server-ip one.
What MineXHost's launcher does with this crash
Two different things, and it is worth being precise about which is which, because only one of them is a fix.
The address case we repair. On every boot MineXEngine test-binds a non-empty server-ip before the JVM starts, and if that address is not bindable inside your container it clears the line so the server binds all interfaces instead. It logs the change as a HEAL. That is aimed squarely at the moved-volume case above: a world brought over from another host boots here instead of failing on an address that no longer exists. A server-ip that does bind is left exactly as you set it.
The occupied-port case we do not repair, deliberately. A bind failure is a terminal pattern in our crash classifier: the engine stops and reports instead of retrying, and it will not move your server to a different port or kill whatever holds the one it was given. Moving the port would break the address your players have saved, and killing an unknown process on a shared machine is not something a launcher should decide on its own. What you get is the line in your console, unsuppressed, naming the port.
The port itself comes from us. Each server gets its own allocation, and the engine writes that port into both server-port and query.port on every boot — so editing server-port by hand in the file manager does not stick, and it is not how you resolve a conflict here. If a mod needs its own reachable port, it needs its own allocation, not the game's.
One narrower guard is worth naming because it prevents a collision we would otherwise cause ourselves. When a UDP mod has no allocation of its own, the engine can point it at the primary port — but not when your server.properties has enable-query=true, because the game's own query listener already holds UDP on that port. In that case it logs the reason and falls back to the mod's default port rather than handing it a bind it cannot win.
MineXHost runs Forge, NeoForge, Fabric and Paper servers on MineXEngine — our launcher auto-detects the modpack, picks the right Minecraft loader and Java version, tunes the JVM for your RAM, and auto-recovers from the crashes that normally end a modded server's evening. Pick your RAM, paste the pack, and play.
See hosting plansFrequently asked questions
What does FAILED TO BIND TO PORT mean on a Minecraft server?
FAILED TO BIND TO PORT means the server could not take ownership of the address and port it asked for, so it printed java.net.BindException and exited before loading anything. Either another process already holds that port — most often a previous run of the same server that never fully stopped — or the server-ip line names an address this machine does not have. The world is untouched either way, because Minecraft never started.
How do I find out what is using port 25565?
Ask the operating system which process owns the socket rather than guessing at it. On Linux run ss -ltnp | grep 25565 and on Windows run netstat -ano | findstr :25565, substituting the port your log named. Both print the process holding the listening socket. If neither returns anything, the port is free and the problem is the address in server-ip, not a conflict.
Should I change server-port to fix Address already in use?
Only if you genuinely intend to run the server on a different port and can reach it there. Changing the port hides the conflict rather than resolving it, and it breaks the address your players have saved. Stop the process that already holds the port first. On managed hosting the port is assigned to your server and written into server.properties on every boot, so editing it by hand will not stick.
Why does my server fail to bind after I moved the world folder?
A server.properties copied from another machine usually carries that machine's server-ip, and an address the new machine does not have cannot be bound — the exception looks identical to a port conflict but no process is holding anything. Clear server-ip so the line reads server-ip= with nothing after it, and the server will bind all interfaces. MineXEngine does this automatically on our servers by test-binding the address before the JVM starts.
Does MineXHost move my server to a free port automatically?
No — a bind failure is treated as terminal, so the engine stops and reports the port rather than retrying, choosing a different port or killing whatever holds the one it was given. Moving the port would break the address your players use, so it is not a decision a launcher should make unattended. The one bind problem it does fix automatically is an unbindable server-ip, which it clears so the server binds all interfaces.