[MC-3776] IPv6 Does Not Work Created: 24/Nov/12 Updated: 09/Nov/20 Resolved: 09/Nov/15 |
|
| Status: | Resolved |
| Project: | Minecraft: Java Edition |
| Component/s: | None |
| Affects Version/s: | Minecraft 1.4.5, Minecraft 1.4.6, Minecraft 1.5, Minecraft 1.5.2, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 1.7.4, Minecraft 14w08a, Minecraft 1.7.5, Minecraft 14w10b, Minecraft 14w10c, Minecraft 1.7.9, Minecraft 1.7.10, Minecraft 1.8-pre1, Minecraft 1.8.8, Minecraft 15w36d |
| Fix Version/s: | Minecraft 15w46a |
| Type: | Bug | ||
| Reporter: | Christopher Fitzgerald | Assignee: | [Mojang] Grum (Erik Broes) |
| Resolution: | Fixed | Votes: | 40 |
| Labels: | address, ipv6, network, protocol | ||
| Environment: |
Windows 7, Linux, probably Mac as well, Java 32/64-bit, official launcher |
||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CHK: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Confirmation Status: | Plausible | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
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...: What actually happened was...: Steps to Reproduce: 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. |
| Comments |
| Comment by ziggurism [ 03/Feb/16 ] |
|
@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? |
| Comment by ziggurism [ 18/Nov/15 ] |
|
@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. |
| Comment by Black Hole [ 18/Nov/15 ] |
|
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. |
| Comment by [Mod] redstonehelper [ 18/Nov/15 ] |
|
For the auth servers, please create a ticket here: https://bugs.mojang.com/browse/WEB |
| Comment by ziggurism [ 18/Nov/15 ] |
|
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 So in addition to 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: |
| Comment by [Mod] Michael Wobst [ 09/Nov/15 ] |
|
Yay! Welcome to 2015, Minecraft |
| Comment by [Mojang] Grum (Erik Broes) [ 09/Nov/15 ] |
|
Time to try this again. |
| Comment by Fernando [ 18/Oct/15 ] |
|
The bug still exists inside minecraft 15w42a, the reason Mojang decided may be related to the java multicast problem of settings the TTL to zero without it, http://stackoverflow.com/q/139909/1542723, however Mojang can use ipv6 multicast addresses to fix the real problem instead of turning the ipv6 stack of |
| Comment by [Mod] Ezekiel (ezfe) [ 18/Oct/15 ] |
They resolved this a few weeks ago, Macs now use the latest Java. |
| Comment by Henrique Domingues [ 18/Oct/15 ] |
|
Use MultiMC if you want connect over IPv6 |
| Comment by Black Hole [ 17/Oct/15 ] |
|
How hard can it be to implement a "use IPv6" checkbox in the launcher and some command line argument for the client? There are plenty of options in the launcher that can seriously damage your game files and world saves. IPv6 wouldn't be one of them. |
| Comment by Hugo Osvaldo Barrera [ 17/Oct/15 ] |
|
> How would you go about reproducing it, unless you have an IPv6-only internet connection? It's quite simple to reproduce: with a dual-stack connection, disable IPv4. You can optionally enable something like NAT64, or another transition mechanism if your server is running on IPv4-only, but since these are really transparent, they're not necessary for the purpose of analysing this ticket. > Disabling the IPv6 stack has no effect on people who also have IPv4 access, and resolved an issue for a substantial number of customers. From what has been described, the root cause of these issues, were misconfigured networks. Properly configuring those networks is the proper solution, and could have satisfied everyone. Personally, I've IPv6-only, with NAT64. I don't have issues reaching hosts (except less than a dozen misconfigured servers - during a period of >2 years). > Mojang made the decision to disable IPv6 based on a substantial volume of complaints and support requests that Minecraft no longer worked. "volume of complaints" should not be the only factor involved. Relevancy of the complaint should be a factor too. If the root cause of a complaint is a misconfigued network (as mentioned several times around IPv6-related issues), then those issues should not be relevant to Mojang or the developers. Tell the users how to configure their network, don't break the game for others. I paid for the game. And I can't play. Reason: Mojang prioritizes people with broken setups. This isn't an aggressive complaint, I'm trying to get a message across: I paid, and now you're saying you don't care about the fact that I cannot play the game. |
| Comment by Fernando [ 17/Oct/15 ] |
|
Reproducing this problem is easy on modern windows systems by turning of the ipv4 stack and leaving ipv6 on, this way your pc will only use your native IPv6 connection, if ipv6 doesn't work correctly in your home/city/country, it doesn't mmean its broken for us al,even more, some ONLY have ipv6 access and they NEED to tunnel their ipv4 over their IPv6 connection. Because minecraft turns IPv6 completly of, they also BREAK the way the OS can tunnel data over an IPV6 only network to the IPv4 part of the world, breaking something what worked for them in the past. IPv6 has worked for Minecraft in the past and mojangs decision to disable ipv6 broke for many ipv6 only networking users with the proper transition techniques in place. For your information, the method to connect to IPv4 address from IPv6 only areas is called NAT64 (rfc6146), this works by translating the IPv4 address from the target to IPv6 addresses representing the same address, this way the IPv6 host only sees connectivity on the IPv6 network and CANNOT use IPv4 sockets to the outside world, even though he can connect to IPv4 host fine thanks to the NAT64. Minecraft CANNOT use this with the setting of disable IPv6, something mojang didn't see coming when they disabled it |
| Comment by [Mod] Torabi [ 17/Oct/15 ] |
How would you go about reproducing it, unless you have an IPv6-only internet connection? As far as I'm aware, most of the world has IPv4 access, some also have IPv6, and very few only have IPv6. Disabling the IPv6 stack has no effect on people who also have IPv4 access, and resolved an issue for a substantial number of customers. I've had an interest in IPv6 for about a decade. Over the years, I've watched it struggle for adoption and tried various tunnel providers. Earlier this year I found that my service provider now claimed to provide IPv6 addresses, and I eagerly changed the settings on my router to try it out. It seemed to work fine, but I could no longer access some sites, such as Wikipedia, which is actually accessible over IPv6. I didn't feel like messing with it at the time, and just changed the settings back. Maybe I did it wrong, maybe my hardware just doesn't support it, maybe it was my service provider, or maybe IPv6 still had some adoption issues. I'm reasonably tech-savvy, but at the time, I just wanted my internet to work. IPv6 support in Java is flaky. For years disabling it was the solution that everyone passed around whenever there was a connection problem. I believe it has improved in Java 8, and I'm starting to see a shift in how developers handle those problems. Disabling it is no longer the common wisdom. However, Mojang has been reluctant to require more recent versions of Java, for reasons unknown to me. Probably Mac support. The recent native launcher they've pushed out, which provides its own version of Java, may resolve their hesitance to rely on features provided by newer versions of Java. I've brought this ticket to the attention of several of the developers at Mojang. Most of the responses I've gotten back are along the lines of "I wasn't aware there was a problem". But the reality is that regardless of the number of people with IPv6 access, very few of them don't also have IPv4 access. Mojang made the decision to disable IPv6 based on a substantial volume of complaints and support requests that Minecraft no longer worked. They're unlikely to reverse that decision until a similar number of complaints and support requests make it clear that it's in their best interest to do so. |
| Comment by Hugo Osvaldo Barrera [ 17/Oct/15 ] |
|
> 22% of Internet users in the USA is on IPv6. This is a large group of people that you would be affecting by disabling the IPv6 Stack. It would seem Mojang simply does not care. For two years, many of us have been completely incapable of playing online, at all, even though we paid the full price for the game. Note that this bug is not accidental, but deliberate, as a workaround for people with broken network configurations (while breaking for other people, with no workaround possible). It would seem that not logical reasoning will make this go away soon, or ever. Just get used to not-playing minecraft: it seems to be the only choice. |
| Comment by Jonathan Martinez [ 14/Oct/15 ] |
|
22% of Internet users in the USA is on IPv6. This is a large group of people that you would be affecting by disabling the IPv6 Stack. |
| Comment by Binero [ 14/Oct/15 ] |
|
How is this issue not confirmed yet? There is 45 comments, and the issue is easy to reproduce. |
| Comment by Daniel [ 15/Jul/15 ] |
|
Any update on this? IPv6 on Minecraft still works (partly) on Linux but not Windows. |
| Comment by Binero [ 07/Feb/15 ] |
|
You can set flags to be passed to the game in the launcher. I'm unsure if this is required though - it's been a while since I touched Minecraft. |
| Comment by Hugo Osvaldo Barrera [ 07/Feb/15 ] |
|
> I added it go the /etc/hosts and I believed I passed an argument for it to prefer IPv6. What argument did you pass to the game for it to do this? AFAIK, it completely disables IPv6 on startup. Or are you just talking about the bootstrap? |
| Comment by Binero [ 07/Feb/15 ] |
|
I added it go the /etc/hosts and I believed I passed an argument for it to prefer IPv6. |
| Comment by Hugo Osvaldo Barrera [ 07/Feb/15 ] |
|
> @Daniel L: Because the problem is more complicated than it appears (read the comments on this issue, and No, not problem is not complicated as it appear. Is main issue here, is that you did a workaround to fix this for people who had broken network settings, while breaking the game for people with their network properly set-up (in other words: I can't use a product I paid for because you prefer to satisfy people who have broken configurations!). The solution is simple, fix IPv6 and:
> Interesting, however, that you report IPv6 as working on Linux. Has anyone tested this with the new, native launcher / bootstrap? One of the barriers to getting this fixed was Mojang's hesitation to push out a new bootstrap, because they couldn't update it automatically, and it must be downloaded manually. However, they released a native installer for Windows in December/January, and are planning on doing the same for Macs in the future. Where can I find this? The one at https://minecraft.net/download has the same sha512 as eight months ago, so there's been no change there. > I've tested on Linux, I can connect to IPv6, but it requires me to add the address to my hosts file and than use the name rather than the address. Not ideal. Can you elaborate further? Did you add the IPv6 of the remote game server to /etc/hosts? Minecraft completely ignores IPv6 AFAIK, what else did you do to get it to connect? |
| Comment by Binero [ 07/Feb/15 ] |
|
I've tested on Linux, I can connect to IPv6, but it requires me to add the address to my hosts file and than use the name rather than the address. Not ideal. |
| Comment by [Mod] Torabi [ 07/Feb/15 ] |
|
@dejl13: Because the problem is more complicated than it appears (read the comments on this issue, and Interesting, however, that you report IPv6 as working on Linux. Has anyone tested this with the new, native launcher / bootstrap? One of the barriers to getting this fixed was Mojang's hesitation to push out a new bootstrap, because they couldn't update it automatically, and it must be downloaded manually. However, they released a native installer for Windows in December/January, and are planning on doing the same for Macs in the future. |
| Comment by Daniel L [ 27/Jan/15 ] |
|
IPv6 on Minecraft seems to work for me on Linux, but not on Windows. Seems like a two line fix, why is this being put off? |
| Comment by Hugo Osvaldo Barrera [ 02/Dec/14 ] |
|
> I run a private cloud that only uses native IPv6. This seems like a large oversight to disable a fundamental networking protocol in this day and age. Indeed, this issue meant the end of minecraft (forever) for those of us where our desktops and laptops only have native IPv6. |
| Comment by Jonathan Martinez [ 02/Dec/14 ] |
|
I run a private cloud that only uses native IPv6. This seems like a large oversight to disable a fundamental networking protocol in this day and age. |
| Comment by Jonathan Kley [ 05/Oct/14 ] |
|
i have the same problem..i cant connect to any server and nothing changes at this issue! |
| Comment by Hugo Osvaldo Barrera [ 10/Sep/14 ] |
|
Is there any update on this? It's been over half a year since I, like many other users can't play multiplayer (after having paid, btw!) - and the situation only gets worse as more and more ISPs transition to IPv6. This is getting completely ridiculous, I wanted to play during the holidays with my friends, the holidays started and ended, and we could not because of code that explicitly breaks support for non-broken networks! |
| Comment by joe kadera [ 03/Sep/14 ] |
|
I ran into this issue recently when attempting to set up a server on my home network that I could connect to from my workplace. My home is assigned an IPv6 from Comcast, so I have no workaround that I have discovered yet to connect to it. |
| Comment by Bernhard Sirlinger [ 23/Aug/14 ] |
|
I would strongly support that as it seems to be the best choice. |
| Comment by Binero [ 23/Aug/14 ] |
|
Can we please at least allow Minecraft to dual stack? We do not have a local IPv4 address which makes me unable to play over LAN. Minecraft should first try to connect to IPv6 and then fallback to IPv4 if that doesn't work. |
| Comment by Martin Schmitt [ 19/Aug/14 ] |
|
I would love to see IPv6 work, too. The plan would be to access a server on my home LAN via OpenVPN with a straightforward IPv6 route instead of having to take care of NAT or RFC1918 addressing conflicts when on the road. |
| Comment by [Mod] Ezekiel (ezfe) [ 05/Aug/14 ] |
|
Hugo, while I know this isn't a complete workaround, you can get it set up and then play in offline mode. At what stage in the launching process are you? (Note: I'm asking because you say you haven't been able to play. Single player is better than no player |
| Comment by Hugo Osvaldo Barrera [ 04/Aug/14 ] |
|
Unlike the above commentor, I have no IPv4 addresses or routes. I've been completely unable to play a game (which I payed for, btw), for several months now. Any idea on when this critical and fatal issue will be fixed? I kinda passes on all my holidays being completely unable to play at all. |
| Comment by Bernhard Sirlinger [ 04/Aug/14 ] |
|
Any News on this? |
| Comment by Hugo Osvaldo Barrera [ 30/Jun/14 ] |
|
Again, if the source for bootstrap were made available, I'm sure I could submit a proper patch for this. I see no reason for you not to release it, since it doesn't actually contain game code or any other secrets (AFAIK). |
| Comment by Hugo Osvaldo Barrera [ 30/Jun/14 ] |
preferIPv4Stack alters preferIPv6Address, which causes this issue. Setting preferIPv6Address is enough to achieve the behaviour you want, and setting preferIPv4Stack cannot be undone programatically. preferIPv4Stack, by transitivity also achieves the behaviour you want, but cannot be alterned, even through reflection.
It does not. As we discussed before, the game seems to alter this setting programatically. There's still the Protocol family unavailable error.
preferIPv6Addresses is the name of the java property, preferIPv6Address is the name of the variable where the setting is stored internally. We're still talking about the same thing here. From java.net.InetAddress: static { preferIPv6Address = java.security.AccessController.doPrivileged( new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue(); AccessController.doPrivileged(new LoadLibraryAction("net")); init(); } Sorry about the confusion on this one. |
| Comment by [Mod] Torabi [ 28/Jun/14 ] |
If that were all true, then Mojang never would have set preferIPv4Stack=true, this ticket would have never been filed, and we wouldn't be having this conversation. So something's amiss.
And if these are both true, then passing "-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Address=true" when starting Minecraft.jar should solve your problem, at least for the launcher and downloading the game. Setting those properties in the JVM arguments field in the launcher profile should also solve it for the game, though as discussed, the network code may assume / be forcing IPv4 somewhere else in the client. I've also just realized that we've been conflating preferIPv6Address and preferIPv6Address*es*. I'm only aware of the latter, and that would some of the confusion. preferIPv6Address may indeed have the behavior you ascribe to it, though it doesn't appear to be documented anywhere. Does it default to true or false? |
| Comment by Hugo Osvaldo Barrera [ 26/Jun/14 ] |
|
> Unless this documentation is wrong, your sample code isn't going to accomplish anything. java.net.preferIPv4Stack is only read at VM startup time, so setting it using System.setProperty() is pointless, because the VM is already running.. Using preferIPv6Address is enough to determine if java uses IPv4 or IPv6:
My sample code uses reflection to overwrite the the value of preferIPv6Address after is has been read, hence overcoming the limitation of it being read only once. Here's how it works:
Hence, IPv6 will only be used if it has been proven to work. I would advise against using he preferIPv4Stack flag since:
> Or maybe the documentation is flat-out wrong. This would not surprise me coming from Oracle. — While I understand that there are some other issues pending, I would appreciate if this issue is given a higher priority. As the game is right now, it cannot be played in any form of multiplayer (eg: Open-to-LAN, Online, Realms, or with a dedicated VPS running a server) by users with no native-IPv4. |
| Comment by [Mod] Torabi [ 24/Jun/14 ] |
|
When I last asked grum about it, they were all neck-deep in merging about 3 months worth of code from several members of the Minecraft team for snapshot 14w25a. They've been a bit busy since dealing with the large number of resulting bugs. I'll bring it to his attention again when things cool off a little. Any testing or research we can do in the meantime will help. One of the obstacles is that the bootstrap (minecraft.jar) needs IPv6 support – as Unless this documentation is wrong, your sample code isn't going to accomplish anything. java.net.preferIPv4Stack is only read at VM startup time, so setting it using System.setProperty() is pointless, because the VM is already running. I guess it might be inherited by a child VM. Or maybe the documentation is flat-out wrong. It seems like it's wrong on what the preferIPv6Addresses setting actually does. It looks to me like the launcher and the game run in separate VMs. I vaguely remember reading somewhere that the launcher passes "-Djava.net.preferIPv4Stack=true" in the command that runs the game, which might be why setting it to false in the JVM argument box wouldn't work. I also don't know how or if those settings affect Netty, though I suspect that there's more to it than that, since reportedly the client did work on IPv6 before the switch to Netty. I would guess that the realms checker doesn't use Netty, which is why it works(ish) with your wrapper. So most likely the network code in the client is written to explicitly use IPv4, and thus doesn't respect the system properties. |
| Comment by Hugo Osvaldo Barrera [ 24/Jun/14 ] |
|
@Torabi: Any updates on this? |
| Comment by Hugo Osvaldo Barrera [ 18/Jun/14 ] |
Not exactly. It means that it tried to bind an IPv4 socket, and IPv4 is unavailable on that interface.
Indeed the issue is java. On an IPv6-only system, it tried to use IPv4 by default until I set the preferIPv6Addresses property to true. Regrettably, java is well know for it's poor network IPv6 compatibility.
That's why it's so very important to fix launcher.jar first. Without fixing it, the game can't even be downloaded. Once launcher.jar works, further issues can be addressed. Have you considered integrating the sample code I provided above? (I just updated it a bit). It will only alter the value of preferIPv6Addresses and preferIPv4Stack after having succesfully tested and made sure IPv6 works correctly and not affect any other scenario, which is what you care about. It shouldn't take more than five minutes to review and integrate it. There'll be no regressions, even for broken network setups.
Nope, running 1.7.9 on a clean install performed yesterday (I could not install minecraft on my desktop before I wrope the crappy wrapper mentioned above).
Yes, I am. Any other IPv6 literal gives the same issue.
Indeed, it is interesting (and confusing) that realms connects and Multiplayer does not. They're inconsistent, but, AFAIK, the same VM. However, now that you've mentioned netty, I can't avoid thinking that it may have a different setting for disabling IPv6, and that's the issue.
It fails, as expected, with the expected error message: java.net.SocketException: Network is unreachable. Or course, this will happen for any address != 127.0.0.1, since there are no IPv4 addreses or routes. |
| Comment by [Mod] Torabi [ 18/Jun/14 ] |
|
As far as I can tell, "java.net.SocketException: Protocol family unavailable" means that it's trying to bind an IPv4 socket to an IPv6 address (and obviously failing). The "BindException" errors grum mentioned appear to be what happens when an IPv6 socket attempts to bind to an IPv4 address, and fails (among other things). The underlying problem may be Java. An IPv6 socket is supposed to be able to communicate with both IPv4 and IPv6 peers, but it may be OS- and implementation-dependent. Minecraft.exe/Minecraft.dmg/Minecraft.jar are all the "bootstrap". The first two are native code for the relevant OS, and the last is platform-independent Java. They're intended to be updated very infrequently, preferably never, because it's apparently difficult to make them auto-update due to security/permissions/sandboxing or something. All the bootstrap does is download and run launcher.jar, which is how they are able to automatically update the launcher. You'll get an error like "MCO Availability Checker #1/ERROR: Couldn't connect to Realms" when using any version that's not realms compatible, such as snapshots. It is interesting, however, that it's coming from the client, and yet you later receive a "Protocol family unavailable" error. It looks like you're trying to connect to a local IPv6 address (::1). What happens if you try to connect to a remote IPv4 address? I would have hoped that all of this would have been cleaned up when the networking code was switched to netty, rather than IPv6 support being broken in the process. I'll have to see if I can get one of the devs to take a look at it. |
| Comment by Hugo Osvaldo Barrera [ 18/Jun/14 ] |
|
@Torabi:
This is curious: [22:44:43 INFO]: Client> [22:44:43] [MCO Availability Checker #1/ERROR]: Couldn't connect to Realms: Realms (500) Server not available! It's not a network or routing error, it's a 500 error that came from the server, so the game used IPv6 up to when it reaches the menu... 22:45:43 INFO]: Client> [22:45:43] [Client thread/WARN]: Unable to start LAN server detection: No such device That's understandable, the game is probably using an IPv4 literal for that, and it's not working. However, when connecting to a server: [22:46:55 INFO]: Client> [22:46:55] [Client thread/INFO]: Connecting to ::1, 25565 [22:46:55 INFO]: Client> [22:46:55] [Server Connector #1/ERROR]: Couldn't connect to server [22:46:55 INFO]: Client> java.net.SocketException: Protocol family unavailable [22:46:55 INFO]: Client> at sun.nio.ch.Net.connect0(Native Method) ~[?:1.7.0_60] [22:46:55 INFO]: Client> at sun.nio.ch.Net.connect(Net.java:465) ~[?:1.7.0_60] [22:46:55 INFO]: Client> at sun.nio.ch.Net.connect(Net.java:457) ~[?:1.7.0_60] [22:46:55 INFO]: Client> at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:670) ~[?:1.7.0_60] [22:46:55 INFO]: Client> at io.netty.channel.socket.nio.NioSocketChannel.doConnect(NioSocketChannel.java:176) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.connect(AbstractNioChannel.java:169) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.channel.DefaultChannelPipeline$HeadHandler.connect(DefaultChannelPipeline.java:1008) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.channel.DefaultChannelHandlerContext.invokeConnect(DefaultChannelHandlerContext.java:494) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:479) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.channel.ChannelOutboundHandlerAdapter.connect(ChannelOutboundHandlerAdapter.java:47) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.channel.DefaultChannelHandlerContext.invokeConnect(DefaultChannelHandlerContext.java:494) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:479) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.channel.ChannelOutboundHandlerAdapter.connect(ChannelOutboundHandlerAdapter.java:47) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.channel.DefaultChannelHandlerContext.invokeConnect(DefaultChannelHandlerContext.java:494) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:479) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:464) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.channel.DefaultChannelPipeline.connect(DefaultChannelPipeline.java:847) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.channel.AbstractChannel.connect(AbstractChannel.java:198) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.bootstrap.Bootstrap$2.run(Bootstrap.java:165) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:348) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) ~[netty-all-4.0.10.Final.jar:?] [22:46:55 INFO]: Client> at java.lang.Thread.run(Thread.java:745) ~[?:1.7.0_60] Looks like the game itself isn't using IPv6. Maybe a new VM is started? I'm really confused. In any case, can you forward the sample code I linked above to the devs? It fixes the issue (at least for minecraft.jar and the launcher) while not affecting any current user negatively (or, if you're one of the dev, can you give me some feedback for that?). Thanks! |
| Comment by [Mod] Torabi [ 18/Jun/14 ] |
|
The java.net.preferIPv4Stack setting relates to the local software (the "stack") used to communicate over the network device. The java.net.preferIPv6Addresses setting controls whether IPv6 or IPv4 addresses are returned by functions, such as when performing a DNS lookup. Which of the two are relevant depends on whether you or the host you're connecting to is running IPv6. It's possible that java.net.preferIPv6Addresses=true forces java.net.preferIPv4Stack=false, but the documentation doesn't say so. Have you tried adding "-Djava.net.preferIPv4Stack=false" to the JVM arguments field in the profile editor in the launcher? Setting that to false either in your wrapper code or the profile settings should work, depending on whether the launcher and game run in the same VM or separate ones. If it doesn't, then there's either a deeper issue than that one setting, or it should be something trivial to fix. |
| Comment by Hugo Osvaldo Barrera [ 17/Jun/14 ] |
|
The fact that it's not obfuscated doesn't make it legal to alter it or provide modified versions to third parties. Also, source is easier to edit than decompiled classes. |
| Comment by [Mod] Ezekiel (ezfe) [ 17/Jun/14 ] |
|
The launcher isn't obfuscated like the game is. |
| Comment by Hugo Osvaldo Barrera [ 17/Jun/14 ] |
|
This comment describes a bit why IPv6 is completely disabled:
I belive he meant the preferIPv6Addresses, but the rest still applies. So I installed eclipse and got to hacking some code: A wrapper For some reason though, the game itself still won't have any network capabilities. I'm not sure if the laucher spawns a new VM, of the game has something else hardcoded to disabled IPv4. A solution If (or rather, hopefully, when) you include this into minecraft, the result would be:
In short, nothing breaks, not even for people with broken configurations, which I think is what's most important here. — As for future issues (though not quite related), here's an example: I'm pretty sure the "Open to LAN" only has an IPv4 multicast literal for announcing/listening, so that would require further changes on behalf of the devs to work. However, that would be a completely new issue once these changes get integrated into the game. I'd appreciate some feedback for this. |
| Comment by Hugo Osvaldo Barrera [ 17/Jun/14 ] |
|
Regarding the launcher
I agree that adding an option (even if it's just a CLI one) would be an acceptable solution (not the best, IMHO, but it'd be enough to keep me happy). MagicLauncher does not work: http://sprunge.us/XgFB Since the launcher itself is rather simple and small, and does not actually contain game code or anything secret, would you consider open sourcing it so we can at least fix the issues for ourselves? I'd much rather mantain a patched version for myself than use a third party launcher. Regarding the game Are there any know workaround? I've managed to install it, but I'm still limited to single player only. Also, have you actually considered the implications of this issue? Many, MANY paying customers cannot play the game, and will not be able to for an undefined future, just because some people out there have broken networks. You guy basically took my money and are unwilling to give me a working game in return. If there's no workaround, can I get a refund? I mean, I either want a game that runs, or my money, you can't expect me to settle for none of both choices. |
| Comment by [Mod] Torabi [ 17/Jun/14 ] |
|
I think the best short-term solution would be a command line option to enable IPv6 support. Little chance of someone without a functioning IPv6 stack accidentally enabling it and receiving the errors that prompted Mojang to disable IPv6 in the launcher. |
| Comment by Omar Evans [ 17/Jun/14 ] |
|
I can confirm that it affects Macs. |
| Comment by Christopher Fitzgerald [ 17/Jun/14 ] |
|
I've not had the time to test (or inspect the bytecode) of versions past 1.6.4 myself. As of those tests, I can for certain state that (at least on Windows) the problem definitely is the launcher (whether that be .exe or .jar). Given you (Hugo) state that Linux appears to suffer a similar problem, I'd bet the same for it. Try running the game from a 3rd party launcher (IPv6 worked with both MultiMC and MagicLauncher last I checked). At this point, given Grum's statement (as pointed out by Omar) I don't feel the need to keep updating this report, since the bug will remain by design. Perhaps they'll fix it when IPv6 becomes more prevalent. At the very least it wouldn't hurt to add an IPv6 option (with an appropriate warning) to the launcher. In the meantime, to use IPv6 we're forced to use a 3rd party launcher or a modified version of the official one. I'll update the topic version (to 1.7.9) and modify the summary to clarify that the launcher's extension is irrelevant and that this affects Linux users as well. |
| Comment by Omar Evans [ 17/Jun/14 ] |
|
In |
| Comment by Hugo Osvaldo Barrera [ 17/Jun/14 ] |
|
Please update the summary; the problem is not minecraft.exe, as this issue is present on GNU/Linux with minecraft.jar. The first sentance of this issue indicates the contray. Also, "Local Network" isn't the only thing affected. Playing online does not work either. Maybe the summary should be updated to include this issue as well? |
| Comment by Tails [ 10/Mar/14 ] |
|
Also see the discussion in |
| Comment by einarjh [ 10/Mar/14 ] |
|
I can't find a way to update the affected versions for this bug, so I'm stating it in a comment instead: bug is still present in Minecraft 14w10c. Side note: The bug will not magically fix itself. Mojang needs to remove the hardcoded disabling of IPv6. To keep asking if the "bug is still present" is pretty useless. |
| Comment by [Mod] Ezekiel (ezfe) [ 21/Feb/14 ] |
|
Is this still a concern in the latest Minecraft version 14w08a? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. |
| Comment by Robert Andersson [ 07/Dec/13 ] |
|
Minecreaft Launcher 1.3.6 bootstrap 5 still has the problem "protocol family unavailable" |
| Comment by Josh C [ 14/Oct/13 ] |
|
1.6.4 also impacted. Has it really taken a year to continue to ask "if it breaks on $CURRENT version?" This is incredibly easy to reproduce for the devs: 1. Run minecraft server. Note that the output of `netstat -a -n -o -p TCPv6` shows java listening on [::]:25565 (wildcard address on the traditional port) Please note that this breaks IPv6 for all but power-users, and more and more ISPs are providing IPv6 access. Additionally, this is a huge problem for users behind CGN (RFC6598) or native-IPv6 with 6to4 transition mechanisms as their IPv4 addresses are NOT globally accessible. Is there a reason this has taken a year to troubleshoot? Even if global IPv6 access isn't on a developer's machine, surely they have access to >=Vista that has built-in IPv6 support... |
| Comment by Christopher Fitzgerald [ 03/Sep/13 ] |
|
Apologies for the lack of updates lately. I've just had a chance to test out the last few versions to see if there was any change. As before, the problem lies with the launcher. I've updated the summary to point out my previous comment regarding its cause. |
| Comment by Christopher Fitzgerald [ 02/Apr/13 ] |
|
Good to see confirmation regarding the launcher. Speaking of which, I had a chance to do a cursory look over its classes and the problem is with LauncherFrame.class. It sets the "java.net.preferIPv4Stack" property to true and the "java.net.preferIPv6Addresses" property to false, which prohibits the use of IPv6 on systems configured as we've described. |
| Comment by Robert Andersson [ 01/Apr/13 ] |
|
WORKAROUND: It's the launcher that creates the problem !! After launching 1.5 or 1.5.1 there is no problems entering IPv6 addresses BTW: I'm running windows 7 - 32bit |
| Comment by Robert Andersson [ 19/Mar/13 ] |
|
Today I installed the latest version of Java, and a new installation of Minecraft on two computers on BUT in the game I still get "java.net.SocketException: Protocol family unavailable" when I There might have been another message flashing by, just before the java... error-message |
| Comment by Robert Andersson [ 17/Mar/13 ] |
|
I have the same problem! I'm using MineCraft 1.5 "Direct Connect" and type "::1" (or 2001::6 or [2001::6] or [::1] ) I do not have IPv6 connectivity to the internet, I'm only running it locally on my LAN... |
| Comment by Christopher Fitzgerald [ 16/Mar/13 ] |
|
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. |
| Comment by Christopher Fitzgerald [ 08/Jan/13 ] |
|
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. |
| Comment by Christopher Fitzgerald [ 20/Dec/12 ] |
|
This problem still persists in Minecraft 1.4.6. |