Mojira Archive
MC-31433

Minecraft does not resolve SRV records when a ipv6 dns resolver is present

When trying to resolve srv records. The default dns value for the resolver returns a ipv6 address, which it was not expecting causing a NumberFormatException. Making any srv record resolving fail. The exception is not displayed without code modification to print the stack trace.

java.lang.NumberFormatException: For input string: "4860:4860::8888"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:458)
at java.lang.Integer.parseInt(Integer.java:499)
at com.sun.jndi.dns.DnsClient.<init>(DnsClient.java:103)
at com.sun.jndi.dns.Resolver.<init>(Resolver.java:44)
at com.sun.jndi.dns.DnsContext.getResolver(DnsContext.java:553)
at com.sun.jndi.dns.DnsContext.c_getAttributes(DnsContext.java:413)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:213)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:121)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:109)
at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:123)
at net.minecraft.src.ServerAddress.getServerAddress(ServerAddress.java:92)
at net.minecraft.src.ServerAddress.func_78860_a(ServerAddress.java:70)
at net.minecraft.src.GuiMultiplayer.func_74017_b(GuiMultiplayer.java:367)
at net.minecraft.src.GuiMultiplayer.func_82291_a(GuiMultiplayer.java:593)
at net.minecraft.src.ThreadPollServers.run(ThreadPollServers.java:40)

Fixed

YukonAppleGeek

2013-09-17, 07:04 AM

2021-10-16, 05:16 PM

2016-10-22, 02:56 AM

10

10

Community Consensus

DNS, ipv6, multiplayer, srv-record

Minecraft 1.6.3 - Minecraft 1.8.8Minecraft 1.6.3, Minecraft 1.7.2, Minecraft 1.7.9, Minecraft 1.7.10, Minecraft 1.8, Minecraft 1.8.1, Minecraft 1.8.7, Minecraft 1.8.8

Minecraft 1.10.2