F Configure a Coherence Cluster

The following section covers the configuration procedure for a standalone Coherence cluster. For details on configuring a managed Coherence cluster, refer to the WebLogic documentation.

Overview

Oracle Coherence standalone deployments can be monitored using Oracle Management Cloud by configuring the Coherence nodes with a set of Coherence and JMX system properties (start arguments). In addition, one of the nodes will have to be configured as a central JMX management node. This JMX management node must expose all Coherence MBeans and attributes. See Creating and Starting a JMX Management Node for details. In addition to configuring the JMX management node, the Cloud Agent must also be installed and configured on the same host as JMX management node. This is required to discover and monitor the Coherence cluster in Oracle Management Cloud.

Coherence Management (JMX) node's MBean server will expose MBeans for entire Coherence cluster. Enterprise Manager will connect to this management node to discover and monitor Coherence cluster.

Creating and Starting a JMX Management Node

The Cloud Agent uses the JMX management node (centralized MBean server) to discover and monitor the entire Coherence cluster, including the nodes and caches. As a best practice, it is recommended that the Management Agent be present on the same host as the JMX management node that is used to discover and monitor the Coherence cluster. The Management Agent must be setup on all the machines on which the Coherence nodes are running to monitor and provision the cluster. To configure the JMX management node, you must:
  • Specify Additional System Properties

  • Include Additional Class Path

  • Use the Enterprise Manager Custom Start Class

Specifying Additional System Properties

Note:

Oracle recommends that the management node is configured as a storage disabled node to ensure minimal performance impact on any Coherence caches.

The following start arguments must be added to one of the Coherence nodes to configure it as the JMX central management node.

  • -Dtangosol.coherence.management.extendedmbeanname=true (allows any restarted node to be automatically detected by Enterprise Manager. This parameter is available in Coherence 3.7.1.9 and later versions)

    • If set to true, the status of the node is automatically refreshed when a node is restarted.

    • If this property is not set, you must use the Refresh Cluster option to update the status of a node when it is restarted.

    • If you start a node after setting this property to true, all nodes in the cluster must be started after the extendedmbeanname property is set to true.

  • -Dtangosol.coherence.management=all (enables monitoring for all nodes)

  • -Dcom.sun.management.jmxremote.port=<port number> (required for remote connection for coherence 12.2.1.x or older versions. )

  • -Dtangosol.coherence.distributed.localstorage=false (disables caching and ensures that the node is a dedicated monitoring node)

  • -Doracle.coherence.home=<coherence home>

  • -Dtangosol.coherence.member=<member name> (required for target name)

  • -Doracle.coherence.machine=<fully qualified hostname> (must match the name of the host discovered in Enterprise Manager)

Note:

If you are using JMX credentials, you must set the following additional start arguments.

  • -Dcom.sun.management.jmxremote.ssl=true

  • -Dcom.sun.management.jmxremote.authenticate=true

If no JMX credentials are used, you must set these arguments to false.

Including the Additional Class Path

You must include the path to the Enterprise Manager custom jar files, coherenceEMIntg.jar and the bulkoperationsmbean.jar for clusters versions older than 12.2.1. These jar files are available in the following locations:

<AGENT_BASE_DIRECTORY>/plugins/oracle.em.sgfm.zip/<VERSION 1.26 or above>/archives/bulkoperationsmbean.jar

<AGENT_BASE_DIRECTORY>/plugins/oracle.em.sgfm.zip/<VERSION 1.26 or above>/archives/coherenceEMIntg.jar

Coherence cluster with version 12.2.1 and above must use the coherenceEMIntg.jar file available in the

<AGENT_BASE_DIRECTORY>/plugins/oracle.em.sgfm.zip/<VERSION 1.26 or above>/archives/12.2.1 directory.

Note:

The location of the .jar files may change based on the plugin version.

Using the Custom Start Class

In addition to configuring the system properties and the class path when starting Coherence management node, it is also required that you use the Enterprise Manager EMIntegrationServer class as the start class. This class allows you to register the custom MBeans required for the Cache Data Management feature of Management Pack for Oracle Coherence.

Example Start Script for the Coherence Management Node

An example start script for the management node is given below:
#
!/bin/sh

CP=$CP:<EM CC_Agent_Home>/plugins/oracle.sysman.emas.agent.plugin_12.1.0.6.0/archives/coherence/coherenceEMIntg.jar:
<EM CC_Agent_Home>/plugins/oracle.sysman.emas.agent.plugin_12.1.0.6.0/archives/coherence/bulkoperationsmbean.jar
COH_OPTS="$COH_OPTS -cp $CP"
$JAVA_HOME/bin/java $COH_OPTS
-Dtangosol.coherence.management.extendedmbeanname=true
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.ssl=false 
-Dtangosol.coherence.management=all 
-Dtangosol.coherence.member=<unique member name> 
-Doracle.coherence.machine=<hostname_as_discovered_in_EM> 
-Dcom.sun.management.jmxremote.port=<OpenTCP_Port>
-Doracle.coherence.home=$COHERENCE_HOME 
-Dtangosol.coherence.distributed.localstorage=false 
-Dtangosol.coherence.management.refresh.expiry=1m 
-server 
-Xms2048m -Xmx2048m 
oracle.sysman.integration.coherence.EMIntegrationServer

Configuring All Other Nodes

In addition to configuring the Coherence JMX management node, you must configure all other Coherence cluster nodes with additional Coherence specific system properties (start arguments) used by Oracle Management Cloud.

 Additional System Properties for All Other Coherence Nodes

The following system properties must be added to all other Coherence nodes.
-Dtangosol.coherence.management.extendedmbeanname=true
-Dtangosol.coherence.management.remote=true –Dtangosol.coherence.member=<unique member name> -Doracle.coherence.home=<coherence home>
-Doracle.coherence.machine=<machine name> should be the same as the name of the host discovered in Oracle Management Cloud.

Note:

If you are using JMX credentials, you must set the following additional start arguments.

  • -Dcom.sun.management.jmxremote.ssl=true

  • -Dcom.sun.management.jmxremote.authenticate=true

If no JMX credentials are used, you must set these arguments to false.

Example Start Script for All Other Coherence Nodes

An example start script for all other Coherence nodes is given below:
#!/bin/sh
 
COH_OPTS="$COH_OPTS -cp $CP"
$JAVA_HOME/bin/java $COH_OPTS
-Dtangosol.coherence.management.extendedmbeanname=true
-Dtangosol.coherence.management.remote=true 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false 
-Doracle.coherence.home=<coherence home>
-Dtangosol.coherence.member=<unique member name> 
-Doracle.coherence.machine=<hostname> 
-Dcom.tangosol.net.DefaultCacheServer

Testing the Configuration

To test the Coherence cluster configuration for use in Oracle Management Cloud, you must verify that the central management (JMX) node has information regarding the managed objects of all other Coherence cluster nodes, caches, services, and so on. Additionally, you must verify that the central management node is accessible remotely, either through <hostname>:<port> OR the JMX Service URL. If JMX credentials are used, they should also be specified.

Verifying Remote Access for the MBean Objects Using JConsole

JConsole is a Java tool available through JDK. You can use this to verify remote access to the MBean objects of entire Coherence cluster nodes, caches, services, and so on.

To verify remote access, open JConsole and select "New Connection". In New Connection page, select Remote Process and provide connection details where <hostname> is the name of the machine where central management node is running, <port> is what you have specified in the -Dcom.sun.management.jmxremote.port parameter while starting the management node. If successful, you will see the MBean object tree.

If you see MBeans for all Coherence nodes in the System MBean Browser or JConsole, you can now discover and monitor the Coherence cluster and its associated elements in Oracle Management Cloud.