Minecraft "An Existing Connection Was Forcibly Closed" Fix

Fix "Internal Exception: java.io.IOException: An existing connection was forcibly closed by the remote host" on a Minecraft server, from both sides.

Updated Oct 7, 2026 · 7 min read

On this page

"Internal Exception: java.io.IOException: An existing connection was forcibly closed by the remote host" means the connection between your game and the Minecraft server was cut off without a clean goodbye. On a server you run, the cause is usually one of three things: the server crashed or froze, one player's saved data or location makes the server drop them, or something on the network (a firewall, VPN or unstable Wi-Fi) killed the connection. The server log tells you which one in under a minute.

What the error looks like

Players see one of these on the disconnect screen:

Connection Lost
Internal Exception: java.io.IOException: An existing connection was forcibly closed by the remote host
Internal Exception: java.net.SocketException: Connection reset

Both are the same family. Java is reporting that the other end of the socket went away. The client cannot tell you why, because from its side the server simply vanished. That is why the fix starts on the server.

Step 1: Check whether the server is the one that went away

Open logs/latest.log on the server (on a hosted server, the Files tab or the live console). Find the time the player was kicked and read the lines around it.

What you see in the log What it means Go to
The server restarted, or a crash report appeared in crash-reports/ The server died and took everyone with it Step 2
Can't keep up! Is the server overloaded? right before The server froze long enough for connections to time out Step 2
<player> lost connection: Disconnected with nothing else The client side closed the connection Step 4
<player> lost connection: Internal Exception plus an error about a packet One player's data or nearby chunk is too big or broken Step 3
Nothing at all at that time The connection never reached the server properly Step 4

If everyone got kicked at the same moment, it is the server. If only one person gets kicked and the rest keep playing, it is that player's data or that player's network.

Step 2: The server crashed or froze

When the whole group drops together, the server process stopped responding.

  • Out of memory. Look for java.lang.OutOfMemoryError in the log. The server needs more RAM, or fewer mods and plugins. See how much RAM a Minecraft server needs.
  • Watchdog kill. Vanilla and Paper stop the server if a single tick takes longer than max-tick-time in server.properties (60000 milliseconds by default). The log says A single server tick took 60.00 seconds. Something froze the main thread, often a huge redstone machine, a farm with thousands of entities or a broken mod. Do not just set max-tick-time=-1. That hides the freeze and players still time out.
  • Lag spikes. A long string of Can't keep up! lines means the server is falling behind. The guide on the "Can't keep up" warning walks through finding the cause with a profiler such as spark.

If the crash happens on startup instead of during play, use the startup crash guide.

A Minecraft village by a river in daylight

Step 3: One player gets kicked every time they join

This is the most common case on a small server, and the one most guides miss. A player logs in, loads for a second, and gets the "forcibly closed" error, while everyone else plays normally. Usually the server cannot send that player the data around them.

Typical reasons:

  • They are standing next to a chunk with a huge amount of data, like a chest room full of shulker boxes packed with written books, or an item frame wall of enchanted gear.
  • Their inventory holds an item with oversized data, often from a bugged mod or a "book ban" exploit.
  • Their player file is damaged after a crash.

To test it without losing anything:

  1. Stop the server.
  2. Find the player's UUID. Open usercache.json and search for their name, or look for UUID of player <name> is ... in the log.
  3. Download world/playerdata/<uuid>.dat as a backup.
  4. Rename <uuid>.dat to <uuid>.dat.bak and start the server. Vanilla cannot teleport an offline player, so this is the quickest clean test.
  5. The player joins as a brand new character at spawn. If they connect fine, their old data or location is the problem.

From here you have two choices. Put the old file back and use an NBT editor such as NBTExplorer to change their Pos coordinates to somewhere empty, which keeps their inventory. Or, if the inventory itself is the problem, clear the bad item in the editor. If they still get kicked at the new location, the item is the cause, not the chunk.

If the problem is a specific chunk, every player who walks near it gets kicked. Remove the offending block with WorldEdit from a safe distance or restore that area from a backup.

Step 4: The network closed the connection

When the log shows a plain disconnect, or nothing, the cut happened between the player and the server.

  1. Restart the router and the PC. Boring, and it fixes a large share of these.
  2. Switch off any VPN or proxy, then try again. Some VPN exit nodes reset long running game connections.
  3. Check the firewall and antivirus. Allow javaw.exe for the Java version the launcher uses. Security suites with "web shield" or "network inspection" features are known to reset Minecraft connections.
  4. Try a wired connection or a phone hotspot. If the error disappears on the hotspot, the home network is the issue.
  5. Test the address. Join with the exact address and port, like play.example.com:25565. If the server sits behind a domain with an SRV record, try the raw IP and port once to rule out DNS.

On the server side, players far away or on unstable connections can be helped by lowering the data load:

# server.properties
network-compression-threshold=256
view-distance=8
simulation-distance=6

network-compression-threshold is 256 by default. Leave it there unless you know the server and players share a fast local network. Setting it to -1 turns compression off and makes the problem worse over the internet. A lower view-distance cuts how much chunk data each player has to receive when they join.

Step 5: Modded servers and proxies

On Forge, NeoForge and Fabric modpacks, the same error shows up when a mod sends a packet larger than the default limit. The log shows something like Packet too big or Badly compressed packet. Install the exact same modpack version on client and server first, since a mismatch causes this too (see the outdated server or client guide). Some packs ship a packet fixing mod for exactly this reason. Check the pack's issue tracker before adding one yourself.

If you run BungeeCord or Velocity in front of your server, check the proxy log as well. A backend server that restarts or a mismatched velocity forwarding secret drops players with the same message on the client side.

When it happens on a hosted server

On a GamezServers Minecraft server, the panel gives you the parts this fix needs without hunting for files: the live console shows the disconnect line as it happens, the Files tab and SFTP get you latest.log, crash-reports and playerdata, and a one click backup before you touch player files means you can always undo. Your server also has its own address and DDoS protection, so you skip the home router side of Step 4. If you want a server where the hardware side is handled, start one on the Minecraft server page.

A player building a base in Minecraft at sunset

FAQ

Is "an existing connection was forcibly closed" a ban?

No. A ban shows "You are banned from this server" with a reason. The forcibly closed message only means the connection dropped without a clean disconnect.

Why does only one player get this error?

Usually because of their own data: an oversized item, a broken player file, or a heavy chunk where they logged out. Rename their playerdata file as a test, as shown in Step 3. If a fresh character connects fine, you have found it.

Does more RAM fix it?

Only if the log shows OutOfMemoryError or the server is freezing from memory pressure. If one player is kicked while others stay connected, RAM is not the cause.

Can my antivirus cause this?

Yes. Network inspection features in some antivirus suites reset the connection Minecraft uses. Allow javaw.exe or test with the feature off for a few minutes.

What does "Connection reset" mean compared to "forcibly closed"?

Same thing in different words. Java on Windows usually prints "forcibly closed by the remote host", while macOS and Linux print "Connection reset". The fixes are identical.

Skip the setup. Your own Minecraft server.

$2.49USD first month

Then $4.99/mo. Just trying it? $1.25 for 3 days

Keep reading