0 Replies Latest reply: Aug 30, 2010 5:43 AM by 843798 RSS

    Remote monitoring and management using JMX with SSL enabled

      I am trying to remote monitoring and management using JMX with SSL enabled.
      But I am getting error, which says

      {color:#ff0000}"java.rmi.ConnectIOException: Exception creating connection to:; nested exception is:
      java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)

      My code looks like this:
      JMXServiceURL url = new JMXServiceURL(
                               "service:jmx:rmi:///jndi/rmi://"  +JMX_IP+  ":"  +JMX_PORT+
                      System.setProperty("javax.net.ssl.keyStorePassword", "springsource");
                      System.setProperty("javax.net.ssl.trustStorePassword", "springsource");
                     String[] credentials = new String[] { JMX_USER, JMX_PWD };
                     Map env = new HashMap();
                     env.put("jmx.remote.credentials", credentials);
                     jmxc = JMXConnectorFactory.connect(url, env);
                     mbsc = jmxc.getMBeanServerConnection();
      Please let me know what exactly is the error? and
      how to get the keystore information (I want to monitor a remote system with SSL enabled for JMX)?