The Coherence-VisualVM Plugin (the Plugin) provides management and monitoring of a single Coherence cluster using the VisualVM management utility.
The Plugin aggregates Coherence MBean data and shows a concise operational view of a single Coherence cluster. Some management information is presented over time, which allows real-time analysis and troubleshooting. You can connect to clusters via JMX or via management over REST with Coherence versions 14.1.1 or above.
The Plugin is an ideal tool for monitoring and managing Coherence clusters during the development and testing lifecycle and supports connecting to both Community Edition and Commercial versions of Coherence.
|
Note
|
This version of the Plugin requires VisualVM release 2.0.6 or later which is available from https://visualvm.github.io/. |
The Plugin will connect to and display data for the following Coherence versions:
Community Editions: 14.1.1.0.x, 20.06.x, 20.12.x, 21.06.x and 21.12.x
Commercial Editions: 14.1.1.0.x, 12.2.1.5.x, 12.2.1.4.x, 12.1.3.x, 12.1.2.x and 3.7.1.x
|
Note
|
If you wish to connect to Coherence version 12.2.1.4.x via REST you should have Coherence version 12.2.1.4.7 or greater. |
The Coherence VisualVM Plugin is available from the list of plugins in VisualVM versions 2.0.6 and above.
To install the Plugin carry out the following:
-
Choose
Tools→Pluginsfrom the main menu. -
The Plugin will be displayed as
VisualVM-Coherence. If it is not present in the list then click on theCheck for Newestbutton -
In the
Available Pluginstab, select the Install checkbox for theVisualVM-Coherence. Click Install. -
Step through and complete the plugin installer.
|
Note
|
If you already have an older version of the plugin installed, click on Check For Newest and follow the prompts.
|
For more information about using the Coherence VisualVM plugin see the official Coherence Documentation.
Other useful resources:
Once the Plugin is installed, you can double-click on a Coherence process in the left pane, usually com.tangosol.net.DefaultCacheServer, after which a Coherence tab will be displayed.
You can also connect via Coherence Management over REST by right-clicking on the Coherence Clusters tree item and choose Add Coherence Cluster.
Provide a name for the cluster and use the following URL based upon what type of cluster you are connecting to:
-
Standalone Coherence -
http://<host>:<management-port>/management/coherence/cluster -
WebLogic Server -
http://<admin-host>:<admin-port>/management/coherence/<version>/clusters- You can uselatestas the version.
|
Note
|
To enable Management over REST for a stand-alone cluster, please see the Coherence Documentation. |
If you have Coherence running within WebLogic Server using the Managed Coherence Servers functionality you can either
connect via REST as described above or if you want to connect to the domain runtime MBean server, use the instructions below.
-
Ensure you have the same version of WebLogic Server installed locally as the instance you are connecting to.
-
Use the following (on one line) to start VisualVM replacing WLS_HOME with your WebLogic Server home.
/path/to/visualvm --cp WLS_HOME/server/lib/wljmxclient.jar:WLS_HOME/server/lib/weblogic.jar -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote -J-Dcoherence.plugin.visualvm.disable.mbean.check=true
NoteOn a Mac, the default VisualVM installed is usually /Applications/VisualVM.app/Contents/MacOS/visualvm. For Windows ensure that you usevisualvm.exeand change the/to\and change the classpath separator from:to;. -
From the VisualVM Applications tree, right-click
Localand selectAdd JMX Connection. The Add JMX Connection dialog box displays. -
Use either of the following connect strings depending upon the WebLogic Version you are connecting to.
For WebLogic Server 14.1.1.X and above use t3 protocol:
service:jmx:t3://hostname:port/jndi/weblogic.management.mbeanservers.domainruntime
For WebLogic Server 12.2.1.5 and below use iiop protocol:
service:jmx:iiop://hostname:port/jndi/weblogic.management.mbeanservers.domainruntime
Notein WebLogic Server 14.1.1.x and above the wljmxclient.jarno longer exists and will be ignored in the classpath. You may remove it from the above--cpstatement if you like. -
Click
Use security credentialsand enter the WebLogic Server username and password. -
Check
Do not require SSL connectionif your connection is not SSL and selectConnect Immediately. -
Right-Click on the connection and select
Open. The Coherence tab will be displayed.
|
Note
|
If you wish to secure access to the REST endpoints or via JMX, please refer to either the Coherence Documentation or relevant JMX security documentation. |
In version 1.0.1 or above of the VisualVM Plugin, you can change the behaviour of the plugin by using the Options pane. To open the options choose the following depending upon your platform:
-
Mac:
VisualVM→Preferencesand select theCoherencetab. -
Windows/Linux:
Tools→Optionsand select theCoherencetab.
You will see the preferences as shown below:
There are tool tips for each of the preferences, but a summary is shown below.
Preference |
Default |
Usage |
Data Refresh Time |
30 |
Time (in seconds) between refreshing data from the cluster. Do not set too low as this could adversely affect performance in large clusters. |
Log Query Times |
false |
Enables logging of query times to the VisualVM logfile when retrieving data. |
Disable MBean Check |
false |
Disables the MBean check when connecting to WebLogic Server. This allows the plugin to startup without checking for Cluster MBean. |
REST Request Timeout |
30000 |
The request timeout (in ms) when using REST to connect to a cluster. |
Enable REST Debug |
false |
Enables HTTP request debugging when using REST to connect to a cluster. |
Disable SSL Certificate Validation |
false |
If selected, will disable SSL certificate validation. Note: You should only use this option when you are sure of the identify of the target server. |
Enable Persistence List |
true |
Enables dropdown list of snapshots rather than having to enter the snapshot when performing snapshot operations. |
Enable Zoom on Graphs |
false |
Enables additional zoom function for all graphs. |
Enable Cluster Snapshot tab |
false |
Enables experimental Cluster Snapshot tab. This tab is useful for seeing all the relevant cluster information on one pae in a text format. |
Enable Cluster Heap Dump |
false |
Enables the cluster heap dump button on the Cluster Overview tab. |
Analyze Unavailable Time in LogFile |
Provides the ability to analyze log files where Partition Events Logging has been enabled for logs generated from Coherence versions 21.06 and above. See here for more details. Note: You select a Coherence log file to analyze and don’t need to be connected to a running cluster. |
For all Coherence clusters, the following tabs are displayed:
-
Cluster Overview - Displays high-level information about the Coherence cluster including cluster name, version, member count and 'Cluster StatusHA'. Summary graphs show total cluster memory available and used, packet publisher and receiver success rates and load averages for machines running Coherence.
-
Machines - Displays a list of the physical machines that make up the Coherence cluster as well as information about the load averages and available memory on these machines.
-
Members - Displays the full list of Coherence members/nodes including individual publisher/ receiver success rates, memory and send queue sizes.
-
Services - Displays information about the running services including partition counts and statusHA values. If you select a service, on the next data refresh you will see detailed thread information for each node of the service as well as graphs of that information
-
Caches - Displays information about any caches including size, and memory usage information. To get the correct information to be displayed for memory usage, you must be using the binary unit-calculator. If you select a cache, on the next data refresh you will see detailed information about each node hosting that service and cache.
Depending upon the edition and functionality you are using, the following optional tabs may be displayed:
-
Proxy Servers - If your cluster is running proxy servers, this tab displays information about the proxy servers and the number of connections across each proxy server and total connections.
-
HTTP Servers - If your cluster is running proxy servers with HTTP acceptors, this tab displays information about the HTTP servers, the number of connections across each server, total connections and graphs of response codes, errors and requests over time for a selected service.
-
Executors - If your cluster is configured to run the Executor Service, this tab displays information number of tasks completed, in-progress and rejected.
-
Coherence*Web - If your cluster is configured for Coherence*Web, this tab displays information about the number applications deployed, the number of HTTP sessions being stored as well as other information regarding session reaping.
-
Federation - If your cluster is configured with Federated Caching, this tab displays information about each federated service. If you select a service, on the next data refresh you will see detailed outbound/inbound federation traffic information for each node of the service as well as graphs of that information.
-
Persistence - If your cluster is configured with Persistence, this tab displays information about each service configured with Persistence. Graphs showing active space used and any additional latencies incurred are also showed.
-
Elastic Data - If your cluster is configured with Elastic Data, this tab displays graphs and information about RAM Journal and Flash Journal usage. You can click on each of the usage bars to show detailed node information
-
JCache - If your cluster is being used to store JCache caches, this tab displays JCache "Management" and "Statistics" MBean information regarding the configured caches.
-
HotCache - If your cluster contains HotCache node(s), then this tab lists the running HotCache instances. If you select an instance, on the next data refresh the console will display statistics and graphs for the operations performed. You may click on tabs and cache-ops to see further fine-grained information.
If you wish to build the Plugin from scratch you need to build the VisualVM dependencies first. To build the plugin is a two-step process:
-
Generate the VisualVM dependencies
-
Build the Coherence VisualVM Plugin
You must have the following:
-
Java JDK 1.8 - To build VisualVM dependencies
-
Java JDK 11+ - To build and test the plugin
-
Ant version >= 1.9.9
-
Maven 3.6.3+
-
Git
-
Clone the Coherence VisualVM repository
$ git clone https://github.com/oracle/coherence-visualvm.git
|
Note
|
These instructions have been summarized from https://github.com/oracle/visualvm/blob/release204/README.md. |
|
Note
|
A Script install-artifacts.sh is available in the bin directory to run this for a Linux/Mac environment.
|
-
Ensure you have JDK8 in you PATH.
-
Checkout the VisualVM repository
$ git clone https://github.com/oracle/visualvm.git Cloning into 'visualvm'... -
Checkout the
release204branch$ cd visualvm $ git checkout release204 Switched to a new branch 'release204'
-
Unzip the NetBeans Platform 11.3
$ cd visualvm $ unzip nb113_platform_19062020.zip -
Build the Plugins
$ ant build-zip
-
Unzip the artefacts
$ cd dist $ unzip visualvm.zip $ cd ..
-
Generate the NBM’s
$ ant nbms
-
Install into the local repository
$ mvn -DnetbeansInstallDirectory=dist/visualvm \ -DnetbeansNbmDirectory=build/updates \ -DgroupIdPrefix=org.graalvm.visualvm \ -DforcedVersion=RELEASE204 org.apache.netbeans.utilities:nb-repository-plugin:populate
|
Note
|
See here for instructions on how to push the artefacts to a remote Maven repository. |
-
Ensure you have JDK11 or above in your PATH.
-
Build the Plugin
From the
coherence-visualvmdirectory:$ mvn clean install -DskipTests
If you wish to run the Community Edition tests then leave out the
-DskipTests. -
Install the Plugin
The plugin will be available in the location
coherence-visualvm-plugin/target/coherence-visualvm-plugin-{version}
Follow the instructions here to install the plugin manually.



