9 Ways to Fix ‘Internal Exception Java.IO.IOException’ Error

The Minecraft launcher may show the ‘Internal Exception Java.IO.IOException’ issue if the Minecraft installation is corrupt or outdated. Moreover, the corrupt DNS cache of the system or improper configuration of Java may also cause the issue at hand.

The issue arises when the user tries to join or connect a server but encounters the following message:

“Connection Lost Internal Exception: java.io.IOException: An existing connection was forcibly closed by the remote host”

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

Before proceeding with the solutions to stop internal exceptions in Java IO IOException, check if trying another network cable (if using an ethernet connection) resolves the issue. If you have a long username (7+ characters), then check if reducing it to (7 or fewer characters) solves the issue. Also, check if your internet speed meets the minimum speed requirements of Minecraft. Moreover, make sure to log out/disconnect the Minechat (if using) and then close it. Additionally, check if launching the Minecraft launcher (or server) as an administrator resolves the issue.

Solution 1: Update the Minecraft Launcher to the Latest Build

You may encounter the internal exception issue if the Minecraft launcher of your system is outdated as it can create incompatibility between the launcher & server. In this context, updating the Minecraft launcher to the latest release may solve the problem. But before moving on, check if you have more than one account configured with the Minecraft launcher, if so, then remove all the other accounts but one.

  1. Open the Minecraft launcher & near the username, click on the Options.
  2. Then click on the Force Update button & apply the launcher update.
    Force Update the Minecraft Launcher
  3. Once updated, relaunch the Minecraft launcher and check if it is clear of the IOexception error.
  4. If not, check if using another launcher resolves the issue.

Solution 2: Clear the DNS Cache of Your System

The Java.io error may emerge if the DNS cache of your system is corrupt as it may lead to the system’s ability to resolve the domain name. In this context, flushing the DNS cache (which will force the system to re-fetch the combinations) may solve the problem.

  1. Click Windows, type: Command Prompt, and right-click on the result of Command Prompt. Then choose Run as Administrator.
    Open Command Prompt as Administrator
  2. Now execute the following one by one:
    ipconfig /flushdns
    
    ipconfig /release
    
    ipconfig /renew
    Flush the DNS Cache
  3. Then exit the Command Prompt and check if the Java exception issue is resolved.

If the issue persists, then check if changing DNS server (e.g., Google DNS) resolves the internal exception issue.

Solution 3: Disable Server’s Resource Pack

Resource packs allow the players to do a lot of customization (like textures, music, models, splash tests, etc.) but this customization may hinder the client/server communication and thus cause the IOexception issue. In this scenario, disabling the server’s resource pack may solve the problem.

  1. Open the Minecraft launcher and select Multiplayer.
  2. Then select the problematic server and click on Edit.
    Edit the Minecraft Server Properties
  3. Now click on Server Resource Packs to set it to Disabled (if enabled) and click on Done.
    Disable Server Resource Packs in Minecraft
  4. Then check if the launcher is clear of the Java.io issue.

Solution 4: Uninstall the Conflicting Applications

You may encounter the Java.io issue if an application on your system is hindering the operation of Minecraft. In this scenario, removing the conflicting application may solve the problem. You can clean boot your PC to find out the problematic application. For illustration, we will discuss the process for the Hamachi VPN (reported by the users to cause the issue).

  1. Right-click Windows & open Apps and Features.
  2. Now click on LogMeIn Hamachi to expand it & then click on Uninstall.
    Uninstall Hamachi
  3. Then follow the prompts to remove Hamachi & reboot your PC.
  4. Upon reboot, check if the IOexception issue is resolved.

Solution 5: Decrease the Render Distance in the Minecraft Settings

The internal exception issue may arise if Minecraft could not render all the video blocks at once (due to the poor internet speed). In this context, decreasing the Render Distance in the Minecraft settings to the lowest possible may solve the problem.

  1. Open the Minecraft Launcher & open its Options (it will be also a good idea to lower the Render Distance in the server settings, if possible).
    Open the Minecraft Options
  2. Now select Video Settings & slide the Render Distance to the lowest possible (e.g., to 2).
    Open Video Settings of Minecraft
  3. Then check if the Java.io issue is resolved. If so, then you may increase the Render Distance by one till you reach your desired Render Distance.
    Set Render Distance to 2 Chunks in Minecraft

Solution 6: Edit the Java Settings

The Java.io error may arise if the Java installation of your system is not properly configured. In this context, editing the Java settings (like enabling the Native Sandbox) may solve the problem. But before proceeding, make sure you have only one Java installation.

Update Java to the Latest Build

  1. Click Windows, type: Configure Java & then open it.
    Open Configure Java
  2. Now steer to the Update tab & click on the Update Now button.
    Click Update Java in the Update Tab
  3. If an update is available, apply the Java update & check if the internal exception issue is resolved.

Enable Native Sandbox

  1. Click Windows, type: Configure Java & open it.
  2. Now steer to the Advanced tab & checkmark Enable the Operating System’s Restricted Environment (Native Sandbox).
    Enable the Operating System’s Restricted Environment (Native Sandbox)
  3. Then apply your changes & reboot your PC.
  4. Upon reboot, check if the Minecraft IOexception issue is resolved.

Edit the Java Path in the Launcher Settings

  1. Right-click Windows & open Run.
  2. Now navigate to the following path:
    \Program Files (x86)\
    Open Program Files (x86) From Run
  3. Then open the Java folder & steer to the latest version of the Java installation (e.g., the jre1.8.0_291 folder).
  4. Now open the Bin folder & copy the address from the address bar.
    Copy the Java Path
  5. Then open the Minecraft Launcher & select Edit Profile.
  6. Now, under Java Settings (Advanced), checkmark the option of Executable.
  7. Then paste the address (copied at step 4) up to Bin, so the path should be something like below:
    C:\Program Files (x86)\Java\jre1.8.0_291\bin\javaw.exe
    Edit the Java Path in the Minecraft Profile Editor
  8. Now apply your changes & check if the internal exception issue is resolved.

If the issue persists, then check if reinstalling Java sorts out the IOexception issue.

Solution 7: Repair / Reinstall the Minecraft

The Java.io issue may arise if the Minecraft installation is corrupt. In this context, repairing or reinstalling it may solve the problem.

  1. Click Windows, type: Control Panel, & launch it.
    Open Control Panel
  2. Now open Uninstall a Program & select Minecraft.
    Repair the Minecraft Launcher
  3. Then click on Repair & follow the prompts to repair Minecraft.
  4. Now reboot your PC & check if the IOexception issue is resolved.
  5. If not, uninstall Minecraft & Java (make sure to back up the essentials).
  6. Now reboot your PC & upon reboot, right-click Windows & select Run.
  7. Then navigate to the following path (copy-paste the address):
    AppData
    Open AppData Through the Run Box
  8. Now open each directory (Local, LocalLow, & Roaming) one by one & delete the Minecraft folders in them.
    Delete the Minecraft Directories in the AppData Folders
  9. Then download the latest versions of Java & Minecraft.
  10. Then install Java as administrator & reboot your PC.
  11. Upon reboot, install Minecraft as administrator & check if the internal exception issue is resolved.

Solution 8: Edit the Network-Related Settings

Minecraft may show the internal exception issue if the network settings of your system are not properly configured (or your ISP is blocking access to a resource essential for the operation of Minecraft). In this case, editing the network settings (or trying another network/VPN) may solve the problem.

Try Another Network or a VPN

  1. Disconnect your system from the current network & connect to another network e.g., the hotspot of your phone to check if the IOexception issue is resolved. You can also check by using a VPN. Also, it will be a good idea to switch between the Wi-Fi and ethernet connection.
  2. If the issue persists, directly connect the system to the internet without the router to rule out if its configuration causing the issue.

Disable NAT Acceleration in the Router’s Settings

  1. Launch a web browser & navigate to the Router’s control page.
  2. Now select LAN (in the left pane) & disable Hardware Acceleration in the Switch Control tab. If the Hardware Acceleration (the Asus branded router feature) is not shown, look for it with different names like CTF (Cut-Through Forwarding) & FA (Flow Accelerator).
    Disable NAT Acceleration
  3. Then apply your changes & check if the internal exception issue is resolved.

Solution 9: Edit the Firewall Settings

You may encounter the internal exception issue if the Firewall of your system is blocking access to a resource essential for the operation of Minecraft. In this context, editing the Firewall settings (like allowing Java (TM) Platform SE Binary in the Firewall settings) may solve the problem. Before proceeding, it will be a good idea to check if temporarily disabling the firewall of your system resolves the issue. For illustration, we will go through the process for the Windows Defender Firewall.

Warning: Advance at your own risk as editing the firewall’s settings is a skillful task & if done wrong, you may expose your system/data to threats.

Set Java (TM) Platform SE to Private in the Firewall Settings

  1. Click Windows, type: Allow an App Through Windows Firewall, & open it.
    Open Allow an App Through Windows Firewall
  2. Now click on Change Settings & in the list of Apps, find Java (TM) Platform SE Binary. If it is not present, click on Allow Another App & steer to the installation directory of Java (usually, the Java directory of Program Files and Program Files (X86) folders) and double-click on Javaw.exe.
    Set Java (TM) Platform SE Binary to Private
  3. Then uncheck the option of Public and checkmark the option of Private for all the Java (TM) Platform SE Binary processes.
  4. Now select Java (TM) Platform SE Binary & click on Details.
  5. Then open Network Type and checkmark Private.
  6. Now apply your changes & reboot your PC.
  7. Upon reboot, check if the IOexception issue is resolved.

Allow the Minecraft Through the Firewall

  1. Click Windows, type: Firewall, & open Windows Defender Firewall.
    Open Windows Defender Firewall
  2. Now make sure no Inbound and Outbound rules related to Minecraft are set to Block the Connection.
    Allow the Minecraft Connection Through the Windows Defender Firewall
  3. Then select Inbound Rules & click on New Rule.
    Create a New Inbound Rule
  4. Now select Program & click on Next.
    Select Program in New Rule Window
  5. Then click on Browse & steer to the installation directory of Minecraft.
    Open Browse and Steer to The Installation Directory of Minecraft
  6. Now double-click on Minecraft.exe & select Allow the Connection.
  7. Then click on Next & select all the three profiles (i.e., Public, Private, & Domain).
  8. Now name the rule & click on Finish.
  9. Then repeat the same for the Outbound Rule & reboot your PC.
  10. Upon reboot, check if the Java.io issue is resolved.

If the issue persists, check if allowing the Minecraft connections through the router’s Firewall (if any) resolves the issue (especially, if it is using some autoblocking feature). If that did not do the trick, check if the parental controls are not restricting the Minecraft access. Also, it will be a good idea to ensure that the ports are properly forwarded in the system/router firewall as required by Minecraft.

If the issue persists, check if allocating more RAM to Minecraft solves the problem. If that did not do the trick, you may contact the server’s admins to delete your player data or check for a server-side problem. If the issue did not resolve so far, you may have to perform a factory reset of your PC & if that did not do the trick, get your system (especially, hard disk and network/Wi-Fi card) checked for a hardware error.

ABOUT THE AUTHOR

Kamil Anwar


Kamil is a certified MCITP, CCNA (W), CCNA (S) and a former British Computer Society Member with over 9 years of experience Configuring, Deploying and Managing Switches, Firewalls and Domain Controllers also an old-school still active on FreeNode.