mojira.dev

This bug/flaw is by design. The Minecraft launcher disables IPv6 (by setting "java.net.preferIPv4Stack" to true). The only workarounds for this are to use a 3rd party launcher or to modify the official one.

------------------------------------------------------------------------

This appears to be a problem with the Minecraft launcher, rather than the minecraft.jar file itself. The launcher sets the "java.net.preferIPv4Stack" property to true and the "java.net.preferIPv6Addresses" to false, prohibiting the use of IPv6 on systems configured as described. Adjusting these two properties should fix the problem.

If Minecraft is started with a 3rd party launcher (such as MultiMC) that doesn't modify these properties as above, it operates correctly.

------------------------------------------------------------------------

Since the new multiplayer interface, Minecraft no longer works for me when using IPv6.

My home network is configured using IPv6, while Internet is only IPv4. Each system has a statically assigned IPv6 address in the unique unicast range fc00::/7. Hostnames have been added for these addresses to each system's hosts file.

What I expected to happen was...:
I should be able to connect to local IPv6 servers.

What actually happened was...:
IPv6 hostnames fail to resolve. IPv4 hostnames in the hosts file do resolve.
A fix in 1.4.5 allows IPv6 addresses to be used, but they fail to connect with the error "Protocol family unavailable".

Steps to Reproduce:
1. Add a server or direct connect using a hostname that resolves only to IPv6 or using an IPv6 address ([::1] or [fc00::1]).
2. Try to connect.

This may require limiting Internet to only use IPv4. I don't have access to IPv6 Internet, or I'd try and see if that works correctly.

If I revert to Minecraft 1.2.5, I can connect to any local IPv6 servers by hostname or IPv6 address without failure.

All other applications I have that support IPv6 work with my network setup.

Linked issues

Comments 68

Christopher Fitzgerald

This problem still persists in Minecraft 1.4.6.

Christopher Fitzgerald

I recently discovered that the problem I've been having appears to be caused by the Minecraft.exe launcher. If I run Minecraft from one of the third party launchers or straight from the minecraft.jar file (albeit without logging in) the problem vanishes.

It looks to me like the launcher may be setting some Java network property that interferes with the use of IPv6 addresses when IPv4 is also present.

Let me know if there is anything I can do to further help determine why this occurs. It would really be nice to use my IPv6 server again.

Christopher Fitzgerald

Sorry for the lack of updates. I've been having some trouble using this site. When I try to browse issues or even a specific issue, it puts me in some kind of redirect loop. I had to enable NoScript so I could start this reply.

The IPv6 problem still persists. As I mentioned previously, the launcher appears to be the culprit. It works fine when I run it in MultiMC. I think the launcher may be setting a Java property that causes it to prefer using the IPv4 stack. Unfortunately, I haven't yet had the time to run it in a debugger to find out exactly what's going on.

Robert Andersson

I have the same problem! I'm using MineCraft 1.5 "Direct Connect" and type "::1" (or 2001::6 or [2001::6] or [::1] )
Then I get java.net.SocketException: Protocol family unavailable

I do not have IPv6 connectivity to the internet, I'm only running it locally on my LAN...

Robert Andersson

Today I installed the latest version of Java, and a new installation of Minecraft on two computers on
different networks.
The client PC could do "telnet 2001:6b0:1d:13::1:a834 25565" so I know the server answers on that address
(Client PC is 2001:6b0:1d:16::82a , a different subnet)

BUT in the game I still get "java.net.SocketException: Protocol family unavailable" when I
type 2001:6b0:1d:13::1:a834 in [Direct Connect]

There might have been another message flashing by, just before the java... error-message
(I caught "Connecting to server" by using PrintScreen, but there might have been more ?!?)

58 more comments

Today (using 15w47a and launcher 1.6.48 for Mac OS X) I tried out Minecraft after switching two computers on my LAN to IPv6 only. In accordance with MCL-2627, I was not able to download the jar files over IPv6, nor authenticate to Mojang over IPv6. So I reverted to IPv4, launched the launcher, downloaded the jar files, authenticated to Mojang, started Minecraft, and then switched them both to IPv6 only. On one, I started a world and "Opened to LAN". But the host did not show up in the multiplayer list on the other machine. So I entered the address manually in the "server address" box of the "Direct connect" multiplayer UI. I used square brackets to separate the IP address and port number like [1111:2222:3333:4444:5555:6666:7777:8888]:60505. With IPv6-only, I was not able to login, the message was "Failed to login: The authentication servers are currently down for maintenance". If I switch IPv4 back on, but direct connect to the IPv6 address, I am able to connect. If I turn off IPv4 after successfully joining a multiplayer session, I am able to remain in the session over IPv6.

So in addition to MCL-2627 (unable to download jar files over IPv6) I see two more issues: the screen that scans for minecraft servers on the LAN is not checking IPv6 network, and the Mojang authentication servers are not accessible over IPv6. I don't fully understand the issue that was fixed in this bugreport (edit: on re-reading, I guess it was direct connect to an IPv6 address, which I did confirm), but until all three issues are resolved, it think it would be premature to say IPv6 works with Minecraft.

I will enter a new bugreport for getting multiplayer sessions to show up on IPv6 LAN scans (edit: MC-92923). As for making the Mojang minecraft authentication servers accessible over IPv6 (edit: WEB-197), should I also file a bug report for that? Since It doesn't relate to the game itself, it's more Mojang server infrastructure...

[Mod] redstonehelper

For the auth servers, please create a ticket here: https://bugs.mojang.com/browse/WEB

The current implementation helps a lot of people with a shared IPv4 address. So they can set up a server and connect to it using IPv6. The server still needs IPv4 for the authentication servers, but not a dedicated IPv4 address.

I'm still hoping Mojang will enable full IPv6 support for all their services soon.

@redstonehelper: thanks for the tip. I have filed two new bugreports, and edited my above comment to include links. I have since discovered that one is a duplicate, though the report it duplicates has been closed, perhaps improperly.

@Oliver, are you sure about that? This bug was fixed in 1.9 snapshots. Also, what is DS Light and what does it have to do with Minecraft?

Christopher Fitzgerald

Erik Broes

Plausible

address, ipv6, network, protocol

Minecraft 1.4.5, Minecraft 1.4.6, Minecraft 1.5, Minecraft 1.5.2, Minecraft 1.6.1, ..., Minecraft 1.7.9, Minecraft 1.7.10, Minecraft 1.8-pre1, Minecraft 1.8.8, Minecraft 15w36d

Minecraft 15w46a

Retrieved