JDK-6467247 : Connection with jconsole of 1.6.0-beta2-b86 fails (while 1.5 succeeds)
  • Type: Bug
  • Component: tools
  • Sub-Component: jconsole
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2006-09-05
  • Updated: 2011-02-16
  • Resolved: 2006-09-05
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
1.6.0-beta2-b86

ADDITIONAL OS VERSION INFORMATION :
Linux 2.6.17-1.2174_FC5

A DESCRIPTION OF THE PROBLEM :
When i start a JMXConnectorServer with the following code
==============
            LocateRegistry.createRegistry(9000);
            MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
            HashMap<String, Object> env = new HashMap<String, Object>();
            JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://localhost:3000/jndi/rmi://localhost:9000/server");
            JMXConnectorServer cs = JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs);
            cs.start();
==============
i can connect with /usr/lib/jvm/java-1.5.0/bin/jconsole service:jmx:rmi://127.0.0.1:3000/jndi/rmi://127.0.0.1:9000/server
but not with /usr/lib/jvm/java-1.6.0/bin/jconsole service:jmx:rmi://127.0.0.1:3000/jndi/rmi://127.0.0.1:9000/server

With the 1.6 jconsole i simply get a connection failed error message, but no more details.

  Tomcat is started with the following JAVA_OPTS:
    -Dcom.sun.management.jmxremote     -Dcom.sun.management.jmxremote.authenticate=false     -Dcom.sun.management.jmxremote.ssl=false

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Implement and register a ServletContextListener with contextInitialized as follows:

            LocateRegistry.createRegistry(9000);
            MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
            HashMap<String, Object> env = new HashMap<String, Object>();
            JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://localhost:3000/jndi/rmi://localhost:9000/server");
            JMXConnectorServer cs = JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs);
            cs.start();

Start tomcat with JAVA_OPTS:
    -Dcom.sun.management.jmxremote     -Dcom.sun.management.jmxremote.authenticate=false     -Dcom.sun.management.jmxremote.ssl=false

The jdk that tomcat is started with has no impact, you can start it with jdk 5 or 6.

Run jdk5's jconsole and you'll be able to connect, run jdk6's jconsole and you'll get a "Connection Failed: Retry?" error.


REPRODUCIBILITY :
This bug can be reproduced always.

Comments
WORK AROUND Use the latest bits from http://download.java.net/jdk6/binaries/
05-09-2006