Uploaded image for project: 'Java Mission Control'
  1. Java Mission Control
  2. JMC-7900

Unable to connect to SSL enabled JVMs when JMC is booted with older versions of JDK

    XMLWordPrintable

Details

    Description

      If JMC is booted up with an older version of JDK 11 (example:- JDK 11.0.0), then it's not able to connect to an  SSL Enabled RJMX Connection with following exception., wherein the keystore and truststore files  are created using the latest version of Java (JDK-20) 

       

      bbanathu-mac:MacOS bbanathu$ ./jmc -consoleLog -vm ~/Downloads/Java/jdk-11.jdk/Contents/Home/bin/
      Started recording 1.
      
      
      Use jcmd 13490 JFR.dump name=JMC_Default filename=FILEPATH to copy recording data to file.
      !SESSION 2022-09-21 20:51:32.927 -----------------------------------------------
      eclipse.buildId=unknown
      java.version=11
      java.vendor=Oracle Corporation
      BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_IN
      Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -consoleLog
      
      
      !ENTRY org.openjdk.jmc.console.ui 4 4 2022-09-21 20:52:26.818
      !MESSAGE Could not connect to 192.168.29.191 : Exception creating connection to: 192.168.29.191; nested exception is: 
      	java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
      !STACK 0
      org.openjdk.jmc.rjmx.ConnectionException caused by java.rmi.ConnectIOException: Exception creating connection to: 192.168.29.191; nested exception is: 
      	java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
      	at org.openjdk.jmc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:345)
      	at org.openjdk.jmc.rjmx.internal.ServerHandle.doConnect(ServerHandle.java:116)
      	at org.openjdk.jmc.rjmx.internal.ServerHandle.connect(ServerHandle.java:106)
      	at org.openjdk.jmc.console.ui.editor.internal.ConsoleEditor$ConnectJob.run(ConsoleEditor.java:99)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
      Caused by: java.rmi.ConnectIOException: Exception creating connection to: 192.168.29.191; nested exception is: 
      	java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
      	at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:631)
      	at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:209)
      	at java.rmi/sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:196)
      	at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:129)
      	at java.management.rmi/javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source)
      	at java.management.rmi/javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2105)
      	at java.management.rmi/javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:321)
      	at org.openjdk.jmc.rjmx.internal.RJMXConnection.connectJmxConnector(RJMXConnection.java:575)
      	at org.openjdk.jmc.rjmx.internal.RJMXConnection.establishConnection(RJMXConnection.java:552)
      	at org.openjdk.jmc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:338)
      	... 4 more
      Caused by: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
      	at java.base/javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:263)
      	at java.base/javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:277)
      	at java.rmi/javax.rmi.ssl.SslRMIClientSocketFactory.createSocket(SslRMIClientSocketFactory.java:121)
      	at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
      	... 13 more
      Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
      	at java.base/java.security.Provider$Service.newInstance(Provider.java:1831)
      	at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
      	at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
      	at java.base/javax.net.ssl.SSLContext.getInstance(SSLContext.java:168)
      	at java.base/javax.net.ssl.SSLContext.getDefault(SSLContext.java:99)
      	at java.base/javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:123)
      	at java.rmi/javax.rmi.ssl.SslRMIClientSocketFactory.getDefaultClientSocketFactory(SslRMIClientSocketFactory.java:207)
      	at java.rmi/javax.rmi.ssl.SslRMIClientSocketFactory.createSocket(SslRMIClientSocketFactory.java:117)
      	at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
      	at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:209)
      	at java.rmi/sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:196)
      	at java.rmi/sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
      	at java.rmi/sun.rmi.transport.DGCImpl_Stub.dirty(DGCImpl_Stub.java:100)
      	at java.rmi/sun.rmi.transport.DGCClient$EndpointEntry.makeDirtyCall(DGCClient.java:377)
      	at java.rmi/sun.rmi.transport.DGCClient$EndpointEntry.registerRefs(DGCClient.java:319)
      	at java.rmi/sun.rmi.transport.DGCClient.registerRefs(DGCClient.java:155)
      	at java.rmi/sun.rmi.transport.ConnectionInputStream.registerRefs(ConnectionInputStream.java:102)
      	at java.rmi/sun.rmi.transport.StreamRemoteCall.releaseInputStream(StreamRemoteCall.java:157)
      	at java.rmi/sun.rmi.transport.StreamRemoteCall.done(StreamRemoteCall.java:320)
      	at java.rmi/sun.rmi.server.UnicastRef.done(UnicastRef.java:447)
      	at java.rmi/sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:129)
      	at jdk.naming.rmi/com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:133)
      	at java.naming/com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:207)
      	at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409)
      	at java.management.rmi/javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1839)
      	at java.management.rmi/javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1813)
      	at java.management.rmi/javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:302)
      	at org.openjdk.jmc.rjmx.internal.RJMXConnection.connectJmxConnector(RJMXConnection.java:575)
      	at org.openjdk.jmc.rjmx.internal.RJMXConnection.establishConnection(RJMXConnection.java:552)
      	at org.openjdk.jmc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:338)
      	at org.openjdk.jmc.rjmx.internal.ServerHandle.doConnect(ServerHandle.java:116)
      	at org.openjdk.jmc.rjmx.internal.ServerHandle.connect(ServerHandle.java:100)
      	at org.openjdk.jmc.browser.wizards.ConnectionWizardPage$ConnectionTester.run(ConnectionWizardPage.java:792)
      	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
      Caused by: java.security.KeyStoreException: problem accessing trust store
      	at java.base/sun.security.ssl.TrustManagerFactoryImpl.engineInit(TrustManagerFactoryImpl.java:73)
      	at java.base/javax.net.ssl.TrustManagerFactory.init(TrustManagerFactory.java:278)
      	at java.base/sun.security.ssl.SSLContextImpl$DefaultManagersHolder.getTrustManagers(SSLContextImpl.java:1052)
      	at java.base/sun.security.ssl.SSLContextImpl$DefaultManagersHolder.<clinit>(SSLContextImpl.java:1022)
      	at java.base/sun.security.ssl.SSLContextImpl$DefaultSSLContext.<init>(SSLContextImpl.java:1197)
      	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
      	at java.base/java.security.Provider.newInstanceUtil(Provider.java:153)
      	at java.base/java.security.Provider$Service.newInstance(Provider.java:1824)
      	... 33 more
      Caused by: java.io.IOException: Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available
      	at java.base/sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2158)
      	at java.base/sun.security.util.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:222)
      	at java.base/java.security.KeyStore.load(KeyStore.java:1479)
      	at java.base/sun.security.ssl.TrustStoreManager$TrustAnchorManager.loadKeyStore(TrustStoreManager.java:365)
      	at java.base/sun.security.ssl.TrustStoreManager$TrustAnchorManager.getTrustedCerts(TrustStoreManager.java:313)
      	at java.base/sun.security.ssl.TrustStoreManager.getTrustedCerts(TrustStoreManager.java:55)
      	at java.base/sun.security.ssl.TrustManagerFactoryImpl.engineInit(TrustManagerFactoryImpl.java:49)
      	... 43 more
      Caused by: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available
      	at java.base/javax.crypto.Mac.getInstance(Mac.java:191)
      	at java.base/sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2136)
      	... 49 more
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            bbanathur Bipin Banathur
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: