VisualVM Troubleshooting Guide

This document describes the most common problems related to using VisualVM and information on how to fix or workaround the problems. If you are experiencing any problem not described in this document, please ask for assistance on a mailing list or file a bug report (you need to be registered to access the mailing list or file a bug report).

VisualVM Does Not Start

Description: VisualVM doesn't start at all without any visible reason.

Resolution:  There are several reasons which could prevent VisualVM from starting:

  • The download is broken - make sure you've got the correct bits (archive managers typically notify you when the archive is broken)
  • VisualVM waits for license confirmation - make sure you haven't overlooked the License Agreement dialog
  • Incorrect JDK is used for running VisualVM - if you haven't defined a JDK to run VisualVM manually, make sure that the default Java on your system is Sun JDK 6+
  • Incorrectly set JDK for running VisualVM - if you have defined a JDK to run VisualVM manually, make sure the path to the JDK is correct and doesn't end with a slash
  • Incorrectly set VisualVM user directory - if you have defined VisualVM user directory manually, make sure it is outside of VisualVM installation directory

Error Starting VisualVM Dialog Is Shown During VisualVM Startup

Description: Error Starting VisualVM dialog is shown during VisualVM startup with a message about an unsupported version of Java.

Resolution:  VisualVM runs only on JDK 6 or 7 (not the JRE). When started on JRE or incorrect JDK version, VisualVM shows this dialog and terminates. To define which JDK will be used for running VisualVM, follow the steps in Getting Started section of the Introduction to VisualVM document.


Local Applications Cannot Be Detected (Error Dialog On Startup)

Description: An error dialog saying that local applications cannot be detected is shown immediately after VisualVM startup.

Resolution:  This can happen on Windows systems, it's a known problem related to the jps JDK tool used by VisualVM to detect running Java applications. There are two main root causes: broken access rights to temporary directory on a NTFS disk - see this thread for details and fix or having temporary directory on a FAT disk - see this bug detail for details and fix.


No Running Remote Applications Detected

Description: There are no running applications shown for remote host in the Applications window on the left side.

Resolution:  Make sure that the jstatd utility is running on the remote host you want to monitor. This is a requirement for VisualVM to be able to discover and access remote Java applications. More information about jstatd can be found in the Remote Applications section of the Introduction to VisualVM document.

Known limitation: In this VisualVM release the jstatd's default port and rminame must be used when starting the jstatd utility, i.e. the use of the -p and -n options is not supported.


Profiler Tab Shows Warning About Class Sharing, Profiling Does Not Work

Description: "Class sharing is enabled for this JVM" warning is shown in red box in Profiler tab, profiling CPU or Memory crashes local applications running on JDK 6 Update 6 and earlier.

Resolution:  There is a known problem with dynamic attach which is used for profiling, it may cause target JVM to crash when class sharing is enabled. To start an application without class sharing, provide -Xshare:off argument to the java command starting the app. More information can be found in this and this bug detail.


Profiler Measures Incorrect Performance Results

Description: Performance profiling results are incorrect - zero or negative times etc.

Resolution:  During first VisualVM startup calibration is performed to measure profiling overhead on local system. The calibration data are then used to measure accurate profiling results. When the system performance changes, calibration data are no more valid and profiling results become biased. To recalibrate the profiler, you have to manually delete the calibration data file <system userdir>/.nbprofiler/machinedata.jdk1X and restart VisualVM - calibration will be performed again on VisualVM startup.


Profiling Does Not Work on Mac OS X

Description: Profiling doesn't work for applications running on Developer preview of JDK 6 on Mac OS X.

Resolution:  Unfortunately profiling does not work with Developer preview of JDK 6, due to bug in the JDK. However you can still take thread and heap dumps of applications running on JDK 6 on Mac OS X.





Validation Warning When Installing a Plugin

Description: Validation Warning dialog with Validation failed message is shown when installing a plugin from VisualVM Plugin Center.

Resolution:  This occurs when installing any plugin from VisualVM Plugin Center. In fact the plugins are valid and trusted, you can simply skip the dialog and continue with plugin installation. The problem is caused by a missing key in VisualVM tool to recognize plugin certificate validity.


Cannot Get The List Of Web Applications From GlassFish

Description: Opening the "Model" subnode of the GlassFish application hangs with "Please Wait" displayed

Resolution:  This happens when monitoring of web applications is not allowed on the target server. In order to enable monitoring you need to go to Application Server/Monitor/Runtime/Configure Monitoring from the GlassFish administration console and set Web Container to High. You can also try and use this link to open the configuration from here.


No Servlets Displayed In The Runtime Area Of GlassFish Web Application Tab

Description: There are no servlets displayed in the runtime are of GlassFish web application tab (see here)

Resolution:  Only servlets with some statistics available are displayed. In order to generate statistics put some load on the web application.