9 Troubleshooting Tricks

This topic lists some known issues and ways to troubleshoot them.

JVM

  • JDK Mission Control fails to find any local JVMs:

    To resolve the issue, consider the following for Windows platform:

    • Ensure that you start the JMC client from <JMC_ROOT>\bin directory.

    • Set the JDK 8 (and later) system path (<jdk_installation_path>\bin) in the PATH environment variable.

    • Ensure that you have access permission to the PATH, while opening jmc.exe. If you don't have access, Run as Administrator.

    • If you are running JMC from Eclipse, then ensure that Eclipse is running on a JDK (not JRE).

    • Ensure that there is a directory named hsperfdata_username in the system's tmp directory that it is writable by you running JMC and that the file system supports access control lists (ACLs).

    Note:

    For information about Linux and macOS configurations, see JDK Mission Control 8 Installation Instructions.
  • Unable to connect to JVM:
    Verify the following:
    • Are you using the correct protocol?

      Ensure that the version of the JVM that you want to monitor and the JVM running the JMC application are the same.

      The format of the service URL is:

      service:jmx:rmi:///jndi/rmi://<hostname>/jmxrmi

    • Are the correct ports opened?

      Running JMX over RMI requires two ports and that one of the ports will not be known beforehand.

    • Is the communication blocked by a firewall?

      For more information, see JDK Mission Control Communication.

  • When attempting to connect to a JVM, stack trace appears indicating that the JVM attempts to communicate with a strange IP or host name:

    Sometimes RMI can have a problem determining which address to use. This can happen due to any of the following scenarios:

    • There are access restrictions in the Security manager.

    • The machine is multihomed and RMI is selecting the wrong interface.

    • There is a misconfigured hosts file or a number of different network related configuration problems.

      If none of the above scenarios work, you can try setting the java.rmi.server.hostname system property. Note that this can affect applications running on the JVM.

Starting JMC

  • Class not found exception when you start JMC:
    To resolve this issue, ensure that you start JMC from the following locations:
    • Windows: <JMC_ROOT>\bin
    • Linux: <JMC_ROOT>/bin
    • macOS: <JMC_ROOT>/JDK Mission Control.app
  • If JMC eclipse plugin is started with JDK 16 or higher, then it may fail to detect locally running JVMs:
    To resolve this issue, add sun.jvmstat.monitor from jdk.internal.jvmstat to All module in the eclipse.ini file. You can also launch eclipse with the following command:
    .\eclipse.exe -vmargs --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED” 
    --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED

Best Practices

Here are some tips or best practices you can use to avoid issues:

  • After setting the preference options like Keystore, Email and so on, restart JMC for the configurations to take effect.
  • If you want to clear the locally persisted configurations, data, and so on, delete <user-home>/.jmc file and restart JMC. The log file is also available in the same location.