Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-31433

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 1.10.2
    • Minecraft 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
    • Mac OS X 10.9
      IPV6 address and resolvers
      java version "1.7.0_45"
      Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
      Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
    • Community Consensus

      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)

            Unassigned Unassigned
            yukonapplegeek YukonAppleGeek
            Votes:
            10 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: