I am trying to run jconsole on my Mac OSX machine to try to analyze some memory leak problems in the application.
jconsole really appears, and it lists local processes, but when I try to connect to a local process, the connection just disconnects.
I found good troubleshooting advice here: https://blogs.oracle.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole
although most of the links on this page no longer work. After reading this article, I started jconsole with this command and saw that jconsole actually throws an exception when trying to connect to my local process.
jconsole -J-Djava.security.debug = all 2> & 1 | tee / temp / log.txt
I see this exception trace, which I will add to the end of this question, but my question is βwhat can I do to fix thisβ? This mac was inherited from another developer who has just left, and I really would like to try and not reinstall the OS. Here is the exception, and I hope that any answer to this question will help someone else:
jar: computed ad8b34ed75936e2e0fb96b807980b012f0d56dc1 jar: jar: beginEntry sun/security/pkcs11/wrapper/Functions$Flags.class jar: Manifest Entry: sun/security/pkcs11/wrapper/Functions$Flags.class digest=SHA1 jar: manifest 752aaf83f970a47664b3722060cf048742854b68 jar: computed 752aaf83f970a47664b3722060cf048742854b68 jar: cryptokiVersion: 2.20 manufacturerID: Apple flags: 0 libraryDescription: Apple PKCS #11 module libraryVersion: 0.01 All slots: 0, 1, 2, 3 Slots with tokens: (none) ProviderConfig: Error loading provider sun.security.jca.ProviderConfig$4@31be0369 java.lang.UnsupportedOperationException: Initialization failed at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:337) at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:86) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at sun.security.jca.ProviderConfig$4.run(ProviderConfig.java:262) at java.security.AccessController.doPrivileged(Native Method) at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:244) at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:224) at sun.security.jca.ProviderList.getProvider(ProviderList.java:215) at sun.security.jca.ProviderList$3.get(ProviderList.java:130) at sun.security.jca.ProviderList$3.get(ProviderList.java:125) at java.util.AbstractList$Itr.next(AbstractList.java:345) at java.security.SecureRandom.getPrngAlgorithm(SecureRandom.java:522) at java.security.SecureRandom.getDefaultPRNG(SecureRandom.java:165) at java.security.SecureRandom.<init>(SecureRandom.java:133) at java.rmi.server.UID.<init>(UID.java:92) at java.rmi.server.ObjID.<clinit>(ObjID.java:71) at sun.rmi.transport.LiveRef.<init>(LiveRef.java:67) at sun.rmi.server.UnicastServerRef2.<init>(UnicastServerRef2.java:51) at sun.management.jmxremote.ConnectorBootstrap$PermanentExporter.exportObject(ConnectorBootstrap.java:171) at javax.management.remote.rmi.RMIJRMPServerImpl.export(RMIJRMPServerImpl.java:84) at javax.management.remote.rmi.RMIJRMPServerImpl.export(RMIJRMPServerImpl.java:75) at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:388) at sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:475) at sun.management.Agent.startAgent(Agent.java:135) at sun.management.Agent.agentmain(Agent.java:95) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:325) at sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:348) Caused by: java.security.ProviderException: slotListIndex is 0 but token only has 0 slots at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:322) ... 33 more
source share