Capturing Heap and Thread Dumps using the Java Visual VM tool

  • 7023253
  • 08-Aug-2018
  • 16-Aug-2021

Environment

Reflection ZFE 2.0 and greater.

Situation

During the troubleshooting process for Reflection ZFE you may be asked to provide a heap and thread dump to Micro Focus Support for analysis. These are the steps required to gather the heap and thread dumps.

Resolution

Capturing Dump Files

  1. First, stop both the MSS and ZFE Session Server services from running.
  2. Then,  enable Enable JMX connections for "Mission Control, Visual VM" in the container.conf file located in the ./Micro Focus/Reflectionzfe/sessionserver/conf directory.
    1. Navigate to the ./Micro Focus/Reflectionzfe/sessionserver/conf and open the container.conf file in text editor of your choice
    2. Scroll down to the # Enable JMX connections for Mission Control, Visual VM section and uncomment out the 3 lines related to JMX connections by removing the # from the begging of each line and to enable each option, replace .x with the next sequential number.

                                                               i.      The find the previous sequence number scroll up to the last un-commented out line and locate the number in front of the  = sign.
For example:
(Before enabling JMX)

                                                             ii.      (After enabling JMX)

    1. Save the file.
  1. Restart the MSS and ZFE Session Server services.
  2. In a web browser navigate to  https://visualvm.github.io/ and download the latest version of the package.
  3. Extract the contents of the .zip.
  4. Once the files have been extracted, navigate to the .\visualvm_141\visualvm_141\bin folder and launch the visualvm.exe executable.
  5. If the visualvm tool was installed on the same box as the ZFE session server follow the steps below to add a new local JMX connection.
    1. In the visualvm tool right click on the local icon and choose the option add a new JMX connection
    2. Specify 3333 as the port number after localhost: in the connection field in the "Add JMX Connection" dialog.

      (You do not need to specify a username and password.)
    3. Press Ok to complete the setup.
    4. You should see a new item added to the Local list.
    5. When you encounter the issue again you will need to right click on the localhost item and choose the option to create both a heap dump and thread dump.
    6. Provide the resulting dump files to Micro Focus Support for analysis. See the section below on "Sending a Trace to Support".
  6. If the visualvm tool was not installed on the same box as the ZFE session server, you will need to follow the steps below to add a new remote connection.
    1. From the applications list right click on remote and choose the option to add a remote host.
    2. Specify the name or IP address of your remote host.
    3. Once added right click on the new remote connection and select the option to add a JMX connection.
    4. Specify port 3333 at the end of the : and press ok.
    5. Follow steps e-f above to complete the process of generating a thread and heap dump and provide it to Micro Focus Support for analysis. See the section below on "Sending a Trace to Support".
Sending a Trace to Support

If you are already working with Technical Support, see the instructions at https://support.microfocus.com/kb/doc.php?id=7024990 on how to upload any files gathered.  If you experience issues with getting the FTS credentials from the Support Portal, contact your Support Engineer who can assist and provide the URL, username, and password for the upload.