mojira.dev
MC-15730

Software caused connection abort: recv failed

Ever since v1.4, this "Software caused connection abort: recv failed" error started happening on a fairly regular basis.

It seemed to be happening in areas containing excessive mobs, which probably contributes to the issue, due to network activity. However, the error does not appear to be related to the operation of the game at all, but related to a threaded background process, that checks your servers for a flag that an updated version is available.

Simply trapping for this error will make a tremendous number of people happy. I can't count the number of people who have been complaining about this very error, with no clue why it's happening.

There is no exception created when this happens. The client simply throws up the error message on the screen and allows you to return to the main menu. However, I run my Minecraft with a batch file that kicks Java off with additional memory activated. So I see the exception text come across in that window and have copied-n-pasted it below.

java.net.SocketException: Software caused connection abort: recv failed
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(Unknown Source)
        at java.net.SocketInputStream.read(Unknown Source)
        at java.io.FilterInputStream.read(Unknown Source)
        at ei.a(SourceFile:185)
        at ci.i(SourceFile:250)
        at ci.c(SourceFile:16)
        at cj.run(SourceFile:94)

java.io.FileNotFoundException: http://assets.minecraft.net/1_6_has_been_released.flag
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at kn.a(SourceFile:234)
        at bkg.run(SourceFile:113)
        at java.lang.Thread.run(Unknown Source)

Linked issues

Attachments

Comments 8

It strikes me as odd, that the application is constantly checking to see if there is an update. When playing on a SMP Server, one must usually play with the version that is compatible with the server. So... If a user is online, playing on an SMP server for several hours. Why in the world is the application checking for version updates? It won't matter until after the user leaves the server anyway.

Wouldn't it be better to simply check for version updates once, when the launcher opens? Or at least only when you've exited the game and are in the main menu? Why keep checking when the user is connected to a server which is compatible with their current client?

Please check if the issue persists with the new launcher downloadable here: http://s3.amazonaws.com/Minecraft.Download/launcher/MinecraftDev.exe

I tested with that launcher and I did get an exception. Athough, not as quickly as I have gotten it in previous versions...

Client> java.net.SocketException: Software caused connection abort: socket write error
Client> 	at java.net.SocketOutputStream.socketWrite0(Native Method)
Client> 	at java.net.SocketOutputStream.socketWrite(Unknown Source)
Client> 	at java.net.SocketOutputStream.write(Unknown Source)
Client> 	at ash.write(Unknown Source)
Client> 	at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
Client> 	at java.io.BufferedOutputStream.flush(Unknown Source)
Client> 	at java.io.DataOutputStream.flush(Unknown Source)
Client> 	at ck.run(SourceFile:121)
Client> java.net.SocketException: Software caused connection abort: recv failed
Client> 	at java.net.SocketInputStream.socketRead0(Native Method)
Client> 	at java.net.SocketInputStream.read(Unknown Source)
Client> 	at java.net.SocketInputStream.read(Unknown Source)
Client> 	at java.net.SocketInputStream.read(Unknown Source)
Client> 	at java.io.FilterInputStream.read(Unknown Source)
Client> 	at ei.a(SourceFile:185)
Client> 	at ci.i(SourceFile:250)
Client> 	at ci.c(SourceFile:16)
Client> 	at cj.run(SourceFile:94)
Client> java.net.SocketException: Software caused connection abort: socket write error
Client> 	at java.net.SocketOutputStream.socketWrite0(Native Method)
Client> 	at java.net.SocketOutputStream.socketWrite(Unknown Source)
Client> 	at java.net.SocketOutputStream.write(Unknown Source)
Client> 	at ash.write(Unknown Source)
Client> 	at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
Client> 	at java.io.BufferedOutputStream.flush(Unknown Source)
Client> 	at java.io.DataOutputStream.flush(Unknown Source)
Client> 	at ck.run(SourceFile:121)
Client> java.io.FileNotFoundException: http://assets.minecraft.net/1_6_has_been_released.flag
Client> 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
Client> 	at kn.a(SourceFile:234)
Client> 	at bkg.run(SourceFile:113)
Client> 	at java.lang.Thread.run(Unknown Source)

Further notes: This problem appears to be related to mobs. I notice it most when attempting to breed sheep.

I created a grid of 16 pens to hold sheep. I laid the pens out so that every other pen began on a new chunk line (block 0), and ran the full length of a chunk in the other direction. (7x15 to account for walls) Spanning 8 chunks. (to ensure that the sheep/chunk was consistent)

I put 2 sheep in each pen and bred them consecutively with the following numbers of resulting sheep (3, 4, 6, 9) and the resulting numbers of baby sheep occurring during the breeding process (1, 1, 2, 3)

Given the fact that this process was occurring on the factor of 16 (each color), the total numbers for the 8 chunks is as follows:

Breeding phase 1: 16 Sheep, 8 Babies
Breeding phase 2: 24 Sheep, 8 Babies
Breeding phase 3: 32 Sheep, 16 Babies
Breeding phase 4: 48 Sheep, 24 Babies

At phase 4, the error starts occurring, and upon reconnecting, some of the new baby sheep were lost.

Given the fact that the sheep mobs have nothing to do with the http get to the version update flag, I can only assume that it has to do with memory and/or thread issues relating to mobs, or the sheer amount of network traffic generated to the server to track the mobs. Either the "mature to adult" event, the "eating" event, the baby mob sound, collision detection, something...

It seems to me that something is leaving a socket, thread, or memory in a bad state, which adversely affects the http get version check process.

I assume this because if I only breed 2 sheep of each color on each phase (instead of all available), and never get above 16 Babies at a time, I can continue to breed sheep on up to about 11 sheep per pen. After all sheep mature, I am safe to breed another sheep of each color. I have not moved past 11 sheep of each color (176 Sheep in 8 chunks)

However, whenever I am within range of those chunks so that they are loaded, I do run a risk of getting the socket error. It happens from time to time. Babies or no babies...

I hope this information is useful in tracking down this very annoying issue. From what I have heard in the community, this problem affects a large base of users, and many people are getting rather frustrated with the situation. If you need anything specific from me, please don't hesitate to ask.

NOTE: I tried this in a single-player world, and the problem did not occur. I will attach a Zip of that world, so you can have an example of the sheep farm I am experiencing this issue with.

This is a 1.5.2 World Save from Single Player, with a sheep farm, that, when built on a server in SMP, causes these exceptions to occur fairly regularly.

This is NOT a duplicate. The other issue that is posted regarding this, references K9 as a conflicting application. I do not run K9, nor anything of the sort.

This is an issue with the Minecraft Client crashing due to an improperly handled exception.

I have found that the K9 web protection Software is causing havoc with playing online. After 2 months of experiencing several versions of Internal Exceptions and looking for answers it was identified as this program as the culprit. After un-installing K9 the connection was stable again. I have contacted K9 and they have suggested using the public version 4.3.188 which I have installed and is working fine with Minecraft Multiplayer. Also If the web site s3.amazonaws.com is not added to the web site exceptions page to allow updates will be blocked..

Again... I do not run K9, so this recent comment, has absolutely nothing to do with this issue that I have documented here.

Todd.Powers

(Unassigned)

Unconfirmed

SocketException, connection-lost, multiplayer

Minecraft 1.5.2

Retrieved