You want to activate the monitoring of SAP J2EE Engine 6.20 Java Application Server. You want to display the monitoring data in the Visual Administrator, in SAP CCMS (RZ20) or in tabulator-separated values text files. You want to prepare SAP J2EE Engine 6.20 for remote services (GoingLive, Early Watch Alert) Other terms
Monitor, Service, Server, CCMS, sapccmsr, RZ20, autostartMonitorServer j2ee, engine Reason and Prerequisites
You need at least SP9 of SAP J2EE Engine 6.20. Monitoring is supported for SAP J2EE Engine 6.20 versions later than SP9 for SAP remote services (EarlyWatch Alert, GoingLive Checks, etc.). Solution
The monitoring of SAP J2EE Engine 6.20 is based on a Monitor Server, which collects data from services and managers of SAP J2EE Engine 6.20 and sends them to different destinations: Visual Administrator, CCMS or text files.
Use the procedure described herein to setup the monitoring.
The Monitor Server can be started as a child process of the Dispatcher, Server or Standalone Node or as a separate java process executing the script
<J2EE Engine>\tools\monitor.bat (monitor.sh)
Note: The Windows notation is used in describing the filepaths.
Since SP20 of SAP J2EE Engine 6.20 the Monitor Server can be started automatically with the startup of the SAP J2EE Engine after setting the autostartMonitorServer property to 'yes' in
<J2EE Engine>\cluster\server\services\monitor\properties file.
The installation workflow consists of several steps. Each of the steps is described in details after the overview.
1. Install the sapccmsr agent.
2. Install the jmon CCMS library.
3. Configure and start the monitor server for productive usage.
4. Setup the monitor server as child process of a Dispacther, Server or StandAlone Node
1. Install the sapccmsr agent
The sapccmsr agent is a part of the SAP CCMS monitoring infrastructure. It must run on every host, where the monitor server of SAP J2EE Engine is running. The sapccmsr agent is also required if the monitor server is running on the same host as the SAP system, which it reports to.
Please refer to SAP Note 371023 for instructions on where to obtain the agent and how to install it.
Detailed information about sapccmsr is available in the SAP NetWeaver Library in the SAP Help Portal. Use the following links according to the release of your CEN:
SAP NetWeaver 7.0: http://help.sap.com/saphelp_nw70/helpdata/en/77/d9ba3b3bf00152e10000000a114084/frameset.htm
SAP NetWeaver 2004: http://help.sap.com/saphelp_nw04/helpdata/en/77/d9ba3b3bf00152e10000000a114084/frameset.htm
Note that we also recommend to install the saposcol agent on every host, where the elements of the SAP J2EE Engine are running. Installation of the saposcol agent is described in Note 371023.
2. Install the jmon CCMS library
The monitor server requires the native library jmon.dll (or libjmon.so for unix platforms), which must be downloaded from the SAP Software Distribution Center (http://service.sap.com/swdc). Choose 'Search for all Categories', and enter the search term 'jmon'.
Please use note 657143 to configure JMON java and native libraries for usage with SAP Engine monitoring service.
3. Configure and start the monitor server for productive usage
The Monitor server can run in two different modes:
a) Manual startup via the batch file
<J2EE Engine>\tools\monitor.bat (monitor.sh)
It provides a command console to navigate Monitor Server interactively.
b) Automatic startup when the J2EE Engine is launched with inconviniences related to the unavoidable death of the Monitor Server process if the parent VM (server or dispatcher), which started it, crashes or is stopped.
For configuring and testing the monitor server, edit
The file contains a template of the properties with pre-filled default values. One may need to change them (at least the login information) or configure the output destination (by default Visual Administrator and CCMS reporting are activated).
The configuration entry monitor.system.CCMS.root is extremely important if you want to connect more than one installation of the SAP J2EE Engine to the same CCMS. The CCMS root name for each SAP J2EE Engine 6.20 installation has to be system-wide unique. Each Monitor Server monitors exactly one SAP J2EE Engine 6.20 installation, that is why if you run multiple installations of SAP J2EE Engine on the same machine you must set up a monitor server for each of them. To avoid conflicts add the following 2 lines to the configuration file properties.
Replace <p4port> with the port you use to connect via the Visual Administrator (by default 3011) or check the value of the 'port' property in <J2EE Engine>\cluster\dispatcher\services\p4\properties for cluster and <J2EE Engine>\alone\services\p4\properties for single node installation.
Once you have created a proper configuration file and your cluster is running, start the monitor server with the shell script
The console window should display error messages for any problems that occur. More detailed description of the errors may be found in file <J2EE Engine>\tools\dev_jmon.
Refer to the troubleshooting section below for possible error messages and their resolution.
For testing purposes act as follows:
- Ensure that the SAP J2EE Engine is running.
- Start the monitor server via monitor script.
- Launch the visual administrator and connect to your cluster/alone installation. In the tree on the left-hand side select the monitor service of a server node. After a double click on 'monitor servers' the tab 'Runtime' on the right-hand side shows all monitor servers.
- Browse the tree to inspect the monitoring data.
4. Setup the monitor server as child process of a Dispatcher, Server or StandAlone Node:
If you want to setup the monitor server to launch automatically in the dispatcher/server/alone node, follow the steps below.
Note, this procedure is relevant only for SAP J2EE Engine versions later than SP20.
- Edit the property autostartMonitorServer of the monitor service of the node that will host the monitor server to 'yes', i.e. autostartMonitorServer=yes. //by the default its value is 'no'
- Specify the location of monitorServer.properties file in configuration.location property of the monitor service. The default value is:
i.e. the properties for the monitor server startup are taken from <J2EE Engine>\tools directory.
For all previous releases the monitor server can be started as a child process of one of the SAP J2EE Engine nodes' processes. On how to do this refer to the steps described beneath.
- Open a command line console to the server/alone node where the monitor server will be hosted. You get the console if you start the node interactively (via the go script) or, if it runs as service, by connecting to the node via the command 'telnet localhost 2323' (2323 is the default value of 'port' property of the telnet service). For more details how to use the shell of a specific node refer to note 531293.
- Start the monitor server from the command line console with the following two commands:
The output from the Monitor Server is written in Troubleshooting
At this point, your monitoring is fully functional. The monitoring tree can be displayed in the SAP J2EE Engine Administrator (in the monitor service) and in transaction RZ20 of your SAP system.
In case of problems visit the troubleshooting section below.
Check the monitor data in CCMS (RZ20)
In transaction RZ20, choose 'SAP CCMS Technical Expert Monitors' and 'System / All Monitoring Segments / All Monitoring Contexts' to find your monitoring data.
- In case of an error message : Monitor Server >>> Problem to start CCMS Reporter because of Version of library is 3.0 - required is 1.6.
This is caused by a version mismatch between the jmon.dll and jmonapi.jar. Refer to note 657143 point 7.
- The former JSP file monitor.jsp is no longer supported.
It is still accessible from the browser but displays just general information.
- In case of an error message: com.sap.mona.api.JMonException: Can not create MTE: no more space: no more MESSAGE_CONTAINER slots available
The monitor segment of the sapccmsr agent must be enlarged by using a profile parameter. The procedure is described in the documentation of the Java Monitoring API (see above). Note that if you have already installed the agent, you have to unregister it before starting it with a new profile. Use the command sequence
sapccmsr -U ; sapccmsr -R pf=some_file
- In case of an error message: Unable to connect to external monitor system. java.lang.RuntimeException: Version of JNI library is 1.41.6.
There may be a version mismatch between native library/jmonapi.jar and/or logging.jar. Update all files from
sapservx:/general/misc/ccms-ma/java-api/sap (or /partner) (for jmonapi.jar/logging.jar)
sapservx:/general/misc/ccms-ma/java-api/lib/ (for jmon.dll /libjmon.so)
(see also Java monitoring API documentation for different versions of jmonapi.jar)
If the monitor server has problems locating its native library you can copy it to some system directory for testing purpose, e.g. c:\winnt\system32 on windows. Refer to note 657143 point 6.
- Data do not appear in RZ20 monitor
Check the CCMS agent related notes and especially information about
- whether the segment is online in RZ21;
- check monitor definition;
- check Technical Expert monitors/all monitor segments/all contexts.
- In case of an error message: Cannot connect to cluster :
javax.naming.NamingException: null ID003814 : !UNSOLICITED! JNDI Exception in getInitialContext of InitialContextFactoryImpl
The cluster related information (host, user, password) is incorrect or the cluster elements are not running (there is no server node, or the dispatcher node is not started, etc.). You may refer to note 620207.
- In case of an error message: Unable to report: MemoryManager because of com.sap.mona.api.JMonException: com.sap.mona.api.JMonAPIException: TID [ <invalid TID>: Monitoring Context] not found in monitoring segment.
You are probably trying to connect more than one SAP J2EE Engine installation to your CCMS without changing the top-level node of the monitoring tree to a unique name. See above how to assign a unique name to monitor.system.CCMS.root property.
- Problems when running the monitor server in background
As the monitor server tries to read input from the console, some problems may appear when it is started as a background process. There are several symptoms observed:
- If the monitor server is running as a Windows service, it consumes ~100% CPU
- If the monitor server is started on a UNIX-like OS in background with 'monitor & ' it hangs. The Visual Administrator also hangs if the 'monitor service' node in VA tree is opened. If the monitor server receives some input source as a workaround (e.g. monitor < /dev/null &) then it consumes much CPU.
A solution to these problems is provided in SAP J2EE Engine SP18. Make sure that the J2EE Engine is SP18 or higher and add -noconsole as a parameter (e.g. monitor -noconsole &)
- The property file (monitorServer.properties) is not read, if the monitor server is started as a child process of the SAP J2EE Server, Dispatcher or Standalone node.
This problem is fixed in SP20 of SAP J2EE Engine. If one wants to start the monitoring automatically, SP20 or higher must be used. Otherwise the monitor server should be started manually.