Windows – Minecraft (Java) frequently loosing connection on Windows 7

javaminecraftnetworkingtroubleshootingwindows 7

Minecraft, a Java client application, is frequently losing connection with the message "Internal exception: java.net.SocketException: Software caused connection abort: socket write error" or the message "Internal exception: java.net.SocketException: Software caused connection about: recv failed".

These are the troubleshooting steps that I have tried and their results:

  • Is minecraft up to date? Update to 1.5 (now to 1.5.1): same error
  • Is my Windows 7 system up to date? Window update, all optional packages installed: same error
  • Is it the server? Connect to another server: same error
  • Is it me? Connect to same server from work: no error!
  • Is it my connection? Normal internet use with Chrome/Fx: no error
  • Is it streaming connections? Long time ssh (putty): no error
  • Is my Java out of data? Updated: same error
  • Should I be using 64 bit Java instead? Installed: same error
  • Maybe 32 bit Java is interfering?
    • Manual launch with full path: same error
    • uninstall 32 bit Java: same error
  • Maybe is should be using 32 bit Java instead? same as above: same error
  • Well – I noticed "Native Method" as the root of the Exception in Java – maybe my drivers? Updated: same error
  • Are the local Minecraft files corrupted? Deleted .minecraft (and restored after): same error
  • Is it my software firewall (Windows built in)? Disabled: same error
  • Is it my antivirus (Windows Defender)? Disabled – with and without firewall: same error
  • If I watch my NIC with Wireshark will I notice anything that might disrupt my stream? Ran wireshark a few times with the connection breaking: no obvious pattern
  • Does my ISP has something against Minecraft for some reason (reaching by now)? Called: They don't do application or port filtering like that
  • My motherboard has problems anyway, maybe if I replace it (different NIC)? Replaced: same error
  • Okay, connect through completely different equipment, to different ISP? Used a different connection, router instead of 1U switch, different ISP, technology, etc (same cable, didn't dig a new one out of storage, but I doubt that's the problem): same error
  • What about a server on 127.0.0.1 (localhost)? Hosted: no error!
  • What if I connect to the localhost server using my public IP? same error!

I am reasonably confident by now that it is related to my system in some way, and not the network, network equipment, or remote server. There is no router or hardware firewall, or any NAT device of any type between me and the internet – were there, that would have been among my first troubleshooting attempts.

What else should I try to diagnose this error? The last two steps seem particularly revealing, but I'm not certain where to go from there.

Edit: so, I installed Cygwin and tried mkfifo backpipe; nc -l 25565 0< backpipe | tee mc.log | nc <server> 25565 1> backpipe from my work box, where it worked, and on my home box, where I instead get "Connection Lost: End of Stream" – fundamentally the same error again.

  • Checked with server op – no firewalls running on his end

Best Answer

Remark: The test using the public IP is not conclusive since normally one cannot self-connect through the router.

It might be worthwhile testing another computer at your home with a first-time installation of java and Minecraft.

Question: Is your Minecraft server in the same country as you ? It might be useful to test with different countries, or using Pingtest.net.

I'm suggesting this because I suspect the Minecraft client (or even Java) of badly handling lags, doing a premature timeout and then making no attempt to reconnect.

In the meantime, the Auto-Reconnect plugin might simplify quickly getting over the error.

A good test to find if the lag problem is caused by an installed product, is to boot into Safe Mode with Network (if the generic display is acceptable with Minecraft). In this mode, no non-Microsoft product can cause lag problems.

The most frequent kind of problematic products that can introduce lags are security suites or parental control products. In the case of the poster, the culprit was K9.

Related Question