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.
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.
- duplicates
-
JDK-6387250 Regression: JConsole fails to connect to a JMX agent of a given JMXServiceURL
-
- Resolved
-