Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6319776

jconsole fails to connect to Java Web Start applications when DHCP used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 5.0, 6
    • core-svc
    • None

      On machines using DHCP, jconsole will fail to connect to applications launched by Java Web Start. The failure arises because the management agent cannot be started in the target VM. This error is "hard to see" at this time because jconsole's error reporting is temporarily broken. It issue can also be demonstrated by configurating the environment to use the DNS name service:

      C:\> java -Dsun.net.spi.nameservice.provider.1="dns,sun" -Dcom.sun.management.jmxremote Application
      Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: foobar: DNS name not found [response code 3]
      Error occurred during initialization of VM
      java.lang.RuntimeException: Exception thrown by the agent
              at sun.management.Agent.error(Agent.java:288)
              at sun.management.Agent.error(Agent.java:279)
              at sun.management.Agent.startAgent(Agent.java:136)
              at sun.management.Agent.startAgent(Agent.java:224)

      The issue is that the local JMX connector server is attempting to use the machine's local address. In DHCP environments the hostname might not be resolved in DNS so the creation of the JMXServiceURL fails. In general the local JMX connector server should be using the loopback address and there is no need to use the host address.

            alanb Alan Bateman
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: