Bug in jconsole of jdk 6 beta2 (Mustang)
These days i encountered a possible bug in jconsole of jdk 6 (it was called Mustang before):
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.
(jconsole of 1.6.0-beta2-b86, Linux 2.6.17-1.2174_FC5)
I filed this as a bug in the sun bug database three days ago, right now i got the notification that the report is accepted and is filed under bug id 6467247.
They say it may take a day or two before the bug shows up in the external database…
This bug seems to be already fixed with bug #6387250. The proposed workaround is to use the latest Mustang snapshots from http://download.java.net/jdk6/binaries/. I’ll try this…
Comment by martin.grotzke — September 7, 2006 @ 8:50 am
Mmmhh… currently i’m using jpackage for managing java related software installs and for Mustang i use a SPEC file provided by Carwyn Edwards. This cannot handle the special snapshot release version, so i’ll probably wait until beta3 of jdk6 will be available.
Comment by martin.grotzke — September 7, 2006 @ 9:16 am
Finally i upgraded to latest mustang bits and bytes (jdk 6 with version 1.6.0-rc-b98).
Now when i start jconsole without username/password information (e.g. simply
jconsole service:jmx:rmi://127.0.0.1:3000/jndi/rmi://127.0.0.1:9000/server) i get the well known “Connection Failed: Retry?” error message. When i use jconsole’s connection dialog and enter username/password information, everything’s fine and i can connect.When i start jconsole from jdk 5 without username/password, i get the connection dialog that displays the message “Authentication failed! Credentials required” together with the activated “Advanced” tab containing input fields for username and password. This is much more better because it tells you the cause of the failure. So let’s see when we have the same in the brand new jconsole…
Comment by martin.grotzke — September 12, 2006 @ 5:35 pm