Вы находитесь на странице: 1из 41

End-To-End Setup Guide for Apache Tomcat

Setup Guide

CUSTOMER Document Version 7.10.20-2012-11-15

This page is left blank for documents that are printed on both sides.

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

TABLE OF CONTENTS
INTRODUCTION ........................................................................................................................................... 6 DIAGNOSTICS ARCHITECTURAL OVERVIEW ................................................................................................. 7 OVERVIEW E2E RCA SETUP FOR APACHE TOMCAT...................................................................................... 8 1. INSTALL SAP HOST AGENT ....................................................................................................................... 9 2. INSTALL SMD AGENT ............................................................................................................................... 9 3. INSTALL INTROSCOPE JAVA AGENT ......................................................................................................... 9 4. CONFIGURE TOMCAT SERVER ................................................................................................................. 9 4.1 JMX remote connection configuration .................................................................................................10 4.2 JVM GC log file configuration ...............................................................................................................16 Oracle JDK ..................................................................................................................................................16 IBM JDK ......................................................................................................................................................17 4.3 Tomcat logging configuration ...............................................................................................................18 5. INSTALL AND RUN SLD DATA SUPPLIER ..................................................................................................19 6. RUN MANAGED SYSTEM CONFIGURATION ............................................................................................20 Start the Managed System Setup wizard for the Tomcat server system. ..................................................20 Perform Managed System Configuration wizard ......................................................................................21 MANUAL SETUP STEPS AND TROUBLESHOOTING ......................................................................................29 Configuration for E2E Exception Analysis and Log Viewer..........................................................................29 E2E Exception Analysis configuration ..........................................................................................................29 Log Viewer configuration ............................................................................................................................31 Log file parser configuration .......................................................................................................................32 Example: Tomcat service log in LogViewer ..................................................................................................35 Configuration for E2E Workload Analysis ...................................................................................................35

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Configuration of the Host Agent Application ...............................................................................................37 GC log file path for Tomcat in Landscape Browser .......................................................................................38 ADDITIONAL INFORMATION.......................................................................................................................40

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

This page is left blank for documents that are printed on both sides.

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Introduction
SAP Solution Manager 7.1 SP1 supports Apache Tomcat Server products with End-to-End Root Cause Analysis. This document describes how to setup and configure E2E RCA in the SAP Solution Manager 7.1 SP1 for Apache Tomcat Server. An up-to-date version of this document is attached to the SAP Note 1633036. This guide is part of a global installation and configuration documentation. You may find more information in the SAP Service Marketplace Root Cause Analysis Installation and Upgrade Guide with SOLMAN_SETUP https://service.sap.com/diagnostics Installation and Configuration Solution Manager Installation Guides https://service.sap.com/instguides SAP Components SAP Solution Manager 7.1

Release

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Diagnostics architectural overview


This sections goal is to provide a ten thousand foot view over the architecture of E2E RCA in Solution Manager 7.1 and to establish basic terminology. End-to-End Root Cause Analysis in SAP Solution Manager 7.1 is based on different components listed below. SAP Host Agent Solution Manager Diagnostics Agent SAP Solution Landscape Directory (SLD) SLD Data Supplier for Apache Tomcat Landscape Management (LMDB) Wily Introscope Enterprise Manager Wily Introscope Java Agent The figure below depicts the key components in the Solution Manager landscape.

Solution Manager Diagnostics Agent The Solution Manager Diagnostics Agent (Diagnostics Agent) is the remote component of the E2E Root Cause Analysis. It allows to perform a connection between SAP Solution Manager and the satellite system(s) (WebSphere) and then to gather information from the satellite systems and reports them to the Solution Manager system.
7

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

SAP Host Agent SAP Host Agent can be considered as the component responsible for the monitoring of the host/OS. It is installed on the satellite system (Tomcat host). Depending on the SMD agent version, SAP Host Agent must be installed separately or the built-in SMD agent instance is used. Wily Introscope Enterprise Manager Wily Introscope is an application management solution created to manage Java Application performance. Introscope has three main components: the Enterprise Manager, the Workstation, and agents. Wily Introscope Java Agent The Java Agent is the component of Introscope that collects performance data from your applications running on Java Virtual Machines (JVMs), and sends it to the Introscope Enterprise Manager. SAP Solution Landscape Directory (SLD) A system landscape consists of a number of hardware and software components that depend on each other with regard to installation, software updates, upgrades, and demands on interfaces. The SAP System Landscape Directory (SLD) is a central repository of system landscape information. SLD Data Supplier for Apache Tomcat The SLD Data Supplier for Apache Tomcat is the software component that runs on the Tomcat server and periodically reports landscape information to the SAP SLD. Landscape Management (LMDB) The Landscape Management Database is the repository of system landscape information in SAP Solution Manager.

Overview E2E RCA setup for Apache Tomcat


The following table lists the steps necessary to set up E2E Root Cause Analysis for an Apache Tomcat Server system.

Setup Step Step1: Install SAP Host Agent Step2: Install SMD Agent Step3: Install Introscope Java Agent Step4: Configure Tomcat Server Step5: Install SLD Data Supplier

To be performed on Managed system (host) Managed system (host) Managed system (Tomcat) Managed system (Tomcat) Managed system (Tomcat)

Remarks Once per Tomcat host Once per Tomcat host Once per Tomcat server Once per Tomcat server Once per Tomcat server
8

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Step6: Run Managed System Setup Step7: Manual Managed System Setup Steps

SAP Solution Manager SAP Solution Manager

Once per Tomcat system Once per Tomcat system

This guide is part of a global installation and configuration documentation. It focuses on the actions performed in the Solution Manager (like Managed System Setup). For other setup steps please refer to following documentation in the SAP Service Marketplace: Root Cause Analysis Installation and Upgrade Guide with SOLMAN_SETUP https://service.sap.com/diagnostics Installation and Configuration Diagnostics Agent Setup Guide https://service.sap.com/diagnostics Installation and Configuration Diagnostics Agent Setup Guide SAP note 1508421 SAP SLD Data Supplier for Apache Tomcat Server SAP note 1438005 Wily Introscope Agent for Apache Tomcat Server

1. Install SAP Host Agent


This step is only required for SMD Agent installation prior 7.3. Since the version 7.3 SMD agent installs SAP Host Agent automatically. Please refer to SAP Note 1031096 Installing Package SAPHOSTAGENT for the details how to install SAP Host Agent component.

2. Install SMD Agent


Please refer to SAP Note 1365123 Installation of Diagnostics Agents for the details how to install SMD Agent component.

3. Install Introscope Java Agent


Please refer to SAP Note 1438005 Wily Introscope Agent for Apache Tomcat server for details.

4. Configure Tomcat Server


To setup E2E RCA for Apache Tomcat please perform following two steps on the Tomcat server.
9

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

1. Enable JMX remote connection to the Tomcat server. 2. Enable Java GC logging. 3. Enable Tomcat logging.

4.1 JMX remote connection configuration


Some Solution Manager applications require JMX remote connection to the Tomcat Server. For example, Thread Dump Analyzer application connects to Tomcat Server through JMX to trigger thread dumps. To configure JMX remote connection to the Tomcat Server set following JVM system properties in the Tomcats JVM startup configuration: com.sun.management.jmxremote com.sun.management.jmxremote.port = <jmx_port>

Password authentication for remote connection is enabled by default. To disable it, set the following JVM system property when you start the Tomcats JVM: com.sun.management.jmxremote.authenticate=false To protect Tomcat from unauthorized JMX access through JMX remote connection you should secure the connection with password and access files. For that add following JVM parameters to the Tomcats JVM configuration com.sun.management.jmxremote.ssl=false com.sun.management.jmxremote.authenticate=true com.sun.management.jmxremote.password.file=<path jmxremote.password> com.sun.management.jmxremote.access.file=<path jmxremote.access>

There <path jmxremote.password> and <path jmxremote.access> are the paths to the password and access control files NOTE: SSL is currently not supported. The password and access files control security for remote monitoring and management. The password file $CATALINA_BASE/conf/jmxremote.password defines the roles and their passwords. The access control file $CATALINA_BASE/conf/jmxremote.access defines the allowed access for each role. Edit the jmxremote.access file. Add an appropriate role with the readwrite access in the jmxremote.access file, for example smdAgentRole like below

smdAgentRole readwrite
10

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Edit the jmxremote.password file. Specify the password for the role you defined in the jmxremote.access file:

smdAgentRole abcd1234

You must specify the role and the password when you perform Managed System Setup for the Tomcat System in the Solution Manager.

11

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Permissions to the password file Ensure that only the owner has read and write permissions on jmxremote.password file, since it contains the passwords in clear text. For security reasons, the system checks that the file is only readable or writeable by the owner and exits with an error if not. This check may cause problems, for example, if Tomcat runs as Windows service as local user account because it might be quite tricky to restrict the access to the local system account.

Tomcat Service running as Local System account

Tomcat Service running as user account

The way you set up the password and access files depends on the platform and whether you are in a singleuser environment or a multi-user environment.

On Windows for a (local) system account Perform following steps to restrict the access on the jmxremote.password file to a built-in system account 1. Right click password file and open Properties. 2. On the Security tab, go to Advanced dialog. 3. In the Advanced Security Settings clear the Include inheritable permissions from this objects parent checkbox. Remove all inherited permissions and apply the changes.

12

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

before

After

4. On the Security tab, edit the permissions. Remove the permissions for all groups/user names except the SYSTEM account.

before

after

13

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

5. Set the file owner to the SYSTEM account. 6.

before

after

Please contact your Windows system administrator in case of problems. The solution may depend on your environment.

NOTE Please note that after applying the steps you wont be able to edit the file any longer because you user will have no permission on the file. To modify the file you will need temporary assign necessary permissions on the jmxremote.password file.

14

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

On Windows for a user account To restrict the access on the jmxremote.password file to the Tomcats user account please perform the steps described above accordingly. 1. Right click password file and open Properties. 2. On the Security tab, go to Advanced dialog. 3. In the Advanced Security Settings clear the Include inheritable permissions from this objects parent checkbox. Remove all inherited permissions and apply the changes. 4. On the Security tab, edit the permissions. Remove the permissions for all groups/user names except the user account that Tomcat runs on. On Linux: Use the cmd chmod 600 to limit the access of file jmxremote.password

Further References Please consult Apache Tomcat documentation for more details. E.g. for The Apache Tomcat 6.0 >Monitoring and Managing Tomcat ->Enable JMX Remote under following link http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html#Enabling_JMX_Remote

Please refer also to Java documentation for JMX, e.g. the Monitoring and Management Using JMX chapter in Java 1.5 documentation on http://download.oracle.com/javase/1.5.0/docs/guide/management/agent.html. The chapter How to Secure a Password File on Microsoft Windows Systems on http://download.oracle.com/javase/6/docs/technotes/guides/management/security-windows.html

Example: JMX parameters for Apache Tomcat server a. If tomcat started via script file (e.g. on Linux) add following JXM system parameters to the Tomcat staring script (e.g. catalina.bat/catalina.sh) set JAVA_OPTS=-Dcom.sun.management.jmxremote; -Dcom.sun.management.jmxremote.port=9004; -Dcom.sun.management.jmxremote.authenticate=true; -Dcom.sun.management.jmxremote.ssl=false; -Dcom.sun.management.jmxremote.password.file= C:/APACHE/Tomcat/Tomcat6.0.33/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file
15

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

=C:/APACHE/Tomcat/Tomcat6.0.33/conf/jmxremote.access NOTE: Pay attention on JVM parameters separator. It is ; on Windows and : on Unix. b. If tomcat started as windows service, open the Configure Tomcat application add the required JVM system properties on the tab Java into the field Java Options

4.2 JVM GC log file configuration


Solution Manager may collect and analyze JVM GC logs for Apache Tomcat. Apache. Tomcat Server does not write GC log by default, however. You should enable GC logging. The procedure depends on underlying JDK. Please consult JDK documentation for more details.

Oracle JDK To enable GC logging please set the following JVM system property when you start Tomcats JVM:

16

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Xloggc:<path to GC.log> - Enables logging for the JVM GC processes into the log file specified by the <path to GC.log> parameter. Please use an absolute path here. -XX:+PrintGCDetails - Gives details about the GCs, such as: Size of the young and old generation before and after GCs; Size of total heap Time it takes for a GC to happen in young and old generation; Size of objects promoted at every GC -XX:+PrintGCTimeStamps - Prints the times at which the GCs happen relative to the start of the application.

IBM JDK To enable GC logging on IBM JDK please set the following JVM system property when you start Tomcats JVM: -verbose:gc - Enables logging for the JVM GC processes into a log file Xverbosegclog:<path to GC.log> - Enables logging for the JVM GC processes into the log file specified by the <path to GC.log> parameter. Please use an absolute path here.

Example: GC parameters for Apache Tomcat server a. If tomcat started via script file (e.g. on Linux) add following JXM system parameters to the Tomcat staring script (e.g. catalina.bat/catalina.sh): set CATALINA_OPTS=%CATALINA_OPTS% -Xloggc: C:/APACHE/Tomcat/Tomcat6.0.33/gcTomcat.gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps b. If tomcat started as windows service, open the Configure Tomcat application add the required JVM system properties on the tab Java into the field Java Options

17

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

4.3 Tomcat logging configuration


Please make sure, Tomcat logging is configured properly. Check whether the JVM system properties java.util.logging.manager and java.util.logging.config.file are set. For example, -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=C:\APACHE\Tomcat\Tomcat6.0.33\conf\logging.properties Please note that the logs have to be written in English (time format and severity information). You have to adjust log parser configuration (LV_config.xml config file) to collect non-English logs. To make sure Tomcat logs are in English you may start Tomcat with following JVM parameters: -Duser.language=en -Duser.region=CA

18

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Example: Sample Tomcat JVM Parameters (Windows) -Dcatalina.home=C:\APACHE\Tomcat6.0.33 -Dcatalina.base=C:\APACHE\Tomcat6.0.33 -Djava.endorsed.dirs=C:\APACHE\Tomcat6.0.33\endorsed -Djava.io.tmpdir=C:\APACHE\Tomcat6.0.33\temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=C:\APACHE\Tomcat6.0.33\conf\logging.properties -javaagent:C:/usr/sap/CCMS/wily/Agent.jar -Dcom.wily.introscope.agentProfile=c:/usr/sap/CCMS/wily/core/config/IntroscopeAgent_tomcat.profile -Dcom.wily.introscope.agent.agentName=wdfd00291023a_8005 -Dcom.sun.management.jmxremote.port=9004 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=C:/APACHE/Tomcat6.0.33/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=C:/APACHE/Tomcat6.0.33/conf/jmxremote.access -Xloggc:C:/APACHE/Tomcat6.0.33/gcTomcat.gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Duser.language=en -Duser.region=CA

5. Install and run SLD Data Supplier


19

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

SAP Solution Manager depends on the technical system definition in the Landscape Management (LMDB). The SLD-DS documentation describes how to install and run the SLD-DS for Apache Tomcat server. Please refer to SAP Note 1508421 SAP SLD Data Supplier for Apache Tomcat for details. Please consult Solution Manager Documentation for general topics like for the steps needed to create or maintain your technical systems inside the Landscape Management of SAP Solution Manager.

NOTE: Consider to assign an appropriate System ID to the Tomcat system describing your Tomcat server in a meaningful way. Use the SYSTEM_ID configuration property of the SLD-DS for that. For example, SYSTEM_ID = ATMFR2 Otherwise the System ID identifier will be automatically assigned by the Solution Manager.

6. Run Managed System Configuration


Managed System Configuration makes your Tomcat system known to the SAP Solution Manager

The Managed System Configuration activity is performed in the SAP Solution Manager Configuration Work Center.

Start the Managed System Setup wizard for the Tomcat server system. a. Start the Open the Configuration Work Center -> Managed System Configuration -> Technical Systems.

b. Select the Tomcat system in the list. It is possible to filter on the system type (Apache Tomcat Server) or on the System ID (ATTMFR2) or look for the entry by the Tomcat port/host name.

20

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

c. Click on Configure System. Managed System Setup wizard will be opened in a separate window.

NOTE: The Technical Systems lists all technical systems known by the Landscape Management (LMDB) in the Solution Manager. If the Tomcat system cannot be found in the list, please check whether the SLD Data Supplier is installed and runs properly.

Perform Managed System Configuration wizard The Managed System Configuration wizard consists of several steps you need to perform to complete Managed System Configuration for the Tomcat system. 1. Select Product to identify the Apache Tomcat product as Diagnostics Relevant 2. Assign Diagnostics Agent to connect the SMD agent on the Tomcat host to the Solution Manager. 3. Enter System Parameters to specify parameters like what are the JMX port/user/password or which Introscope Enterprise Manager to be used 4. Enter Landscape Parameters to specify Tomcats installation path 5. Configure Automatically to run Introscope Host Adapter and Extractor setup.

Select Product

On the Select Product page you need to select diagnostics relevant products installed on the Tomcat server.

21

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

The TOMCAT BY APACHE (of particular version) is the installed product for the Apache Tomcat software. The SBOP BI PLATFORM is the example of another product that can be reported as installed on the Tomcat server (e.g. for BOE XI application).

In this step, please select the Diagnostics Relevant checkbox.

NOTE: In the Managed System Configuration you can only mark all the installed Software Products as Diagnostics Relevant. If you want to differentiate between them (to say, for example, SBOP BI PLATFORM is not Diagnostics Relevant) you can mark single Products in the Technical System Editor. For that click on the Edit Technical System Software button and set the Diagnostics Relevant check boxes accordingly.

22

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Assign Diagnostics Agent Connect the Diagnostics Agent to the Solution Manager and assign it to the Tomcat managed system.

If no Diagnostics Agent on Tomcats host is yet connected to the Solution Manager, go to the SLD Agent Candidates tab and connect the Diagnostics Agent to the Solution Manager.

23

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

The operation may take some time to complete.

Go to the Agent Assignment tab and assign the Diagnostics Agent to the Tomcat system.

24

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Enter System Parameters Specify or verify system parameters for the Tomcat. Common parameters Introscope EM - the Introscope Enterprise Managers host and port to which Wily Java Agent on the Tomcat server reports to. Tomcat Host the host name there the Tomcat server is installed Tomcat Http Port the Tomcats Http port HTTPs checkbox whether HTTPS protocol should be used (typically not)

Tomcat parameters Setup User the role name for the JMX remote connections authorization (the value from the jmxremote.password) or blank, if no applicable.
25

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Password the password for the JMX remote connections authorization (the value from the jmxremote.password) or blank, if no applicable. JMX Port the port for the JMX remote connection.

Save the data pressing the Save button.

26

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Enter Landscape Parameters Please inspect the Landscape Objects in the hierarchy and check whether any user input is required. The status is set to No Parameter: no input required. The status is set to Default used: verify the parameter. The status is set to Input missing: enter the parameter.

SLD DS automatically reports the installation path of the Tomcat server. That value is marked as the default value for the Installation path parameter (Default used should appear). Please check the parameters for the Tomcat system and update if appropriate.

27

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

IMPORTANT: for the first time, please save the data in that dialog in any case even if did change any values. Otherwise the landscape parameters will not be propagated to the configuration store of the Solution Manager.

Configure Automatically Perform the Extractor Setup and Introscope Host Adapter activities. It may take several minutes. Please verify that both activities have been completed successfully. The status for both must be set to Green.

Check also the messages and other detailed information in the Log area at the end of the screen.

28

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

The Apache Tomcat is configured now for End-to-End Root Cause Analysis

Manual Setup Steps and Troubleshooting


Typically, no manual configuration is necessary for Apache Tomcat server. The described setup steps should enable E2E Root Cause Analysis for Apache Tomcat system. However, for some E2E RCA application it might be necessary to perform addition configuration in Solution Manager/Tomcat Server. This chapter provides the details helpful for troubleshooting/manual configuration in problem cases.

Configuration for E2E Exception Analysis and Log Viewer


Solution Manager 7.1 can display Tomcats log files in the Log Viewer application and collect and analyze errors in the E2E Exception Analysis application. However, logging in Tomcat is very flexible. Tomcat logging can utilize different framework (Log4J, Java logging etc.) and can be configured very differently. Logging depends also on the OS settings/user preferences. The Log Viewer/E2E EA for Tomcat functionality depends on correct configuration that matches the log settings of the particular Tomcat system.

E2E Exception Analysis configuration Open SAP Solution Manager Administration WorkCenter -> Framework -> Root Cause Analysis -> Tab Views

29

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Click on the Display configuration and inspect the configuration for Apache Tomcat (search for catalina in the config.xml file)

Following Tomcat log files are configured in E2E Exception Analysis for Apache Tomcat stderr*.log stdout*.log catalina*.log manager*.log host-manager*.log localhost*.log admin*.log jakarta_service*.log common-demon*.log
30

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

The files are collected from the Tomcat default log folder %CATALINA_HOME%/logs. Please make sure, Tomcat logging is configured properly.

Log Viewer configuration Open SAP Solution Manager Administration WorkCenter -> Framework -> Root Cause Analysis -> Tab Stores

Navigate to the node APACHE TOMCAT 5.5 and inspect the LOGS storec.

31

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Following Tomcat log files are configured in LogViewer application for Apache Tomcat stderr*.log stdout*.log catalina*.log manager*.log host-manager*.log localhost*.log admin*.log jakarta_service*.log

Log file parser configuration Regular expressions are used to parse Tomcats log file. They are specified in the LV_config.xml configuration file of the Diagnostics Agent. To check the configuration open Diagnostics Agent Administration -> Application Configuration -> com.sap.smd.agent.application.logfilecollector application. Select the correct Diagnostics Agent and download the LV_config.xml file

32

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Inspect the LV_config.xml file content. Find the configuration sections for Tomcat Tomcat_FileSet (to parse Tomcat logs) and Tomcat_Jakarta_FileSet (to parse Tomcat service log on Windows). The regular expressions specified by the parameter Regex and the used time stamps TimestampFormat must be match Tomcat logs.

33

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

For example, to parse Tomcat Windows Service log Jakarta_service.log shown below [2011-07-08 13:27:06] [info] Commons Daemon procrun (1.0.5.0 32-bit) started [2011-07-08 13:27:06] [info] Running 'Tomcat6' Service... [2011-07-08 13:27:06] [info] Starting service... [2011-07-08 13:27:07] [info] Service started in 1249 ms. [2011-07-08 13:27:22] [info] Stopping service... [2011-07-08 13:27:23] [info] Service stopped. [2011-07-08 13:27:23] [info] Run service finished. [2011-07-08 13:27:23] [info] Commons Daemon procrun finished

The pattern for the regular expression in the Tomcat_Jakarta_FileSet must be [timestamp] (optional [location]) [severity] Message Depending on the user preferences (language, time and date format), the applicable timestamp pattern are: Format="MMMM dd, yyyy hh:mm:ss a" Language="en" Country="US"
34

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Format="dd.MM.yyyy hh:mm:ss a" Language="de" Country="DE" Format="dd-MMM-yyyy hh:mm:ss" Language="de" Country="DE" Format="dd-MMM-yyyy hh:mm:ss" Language="en" Country="US" Format="yyyy-MM-dd HH:mm:ss" Language="en" Country="US"

Example: Tomcat service log in LogViewer The Windows Service log Jakarta_service will be displayed in the LogViewer application:

Configuration for E2E Workload Analysis


E2E Workload Analysis for Apache Tomcat server uses performance data in Wily Introscope from two nodes: Wily Java Agent node - the data reported by the Wily Java Agent Wily Host Adapter node the data is reported by the Diagnostics Agent The Wily Java Agent node has to match following structure -<Host Name> - Tomcat - <Host Name>_<Tomcats shutdown port>

35

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

The Wily Host Agent node has to match following structure -<Host Name> - SAP HostAgent Process - SAP HostAgent <SMD Agent Instance>

The Wily Host Agent node must contain the SAP GC sub node with an item for the Tomcat server beneath it.

36

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

If no Host Agent node is available of if SAP GC node is missing, please verify that 1. SAP Host Agent is installed and running properly. 2. The Introscope Host Adapter activity in the Managed System Configuration has been successfully performed. 3. The configuration file SapAgentConfig.xml for the Host Agent application contains correct entries for the Tomcat system. 4. JVM GC log file is configured on the Tomcat server and its patch is available in the LMDB for the Tomcat system

Configuration of the Host Agent Application The Wily Host Agent is a Diagnostics Agent application that analyzes and makes JVM GC performance data in Wily Introscope. Its configuration is stored in the SapAgentConfig.xml file. To check the configuration open Diagnostics Agent Administration -> Application Configuration -> com.sap.smd.agent.application.wilyhost application. Select the correct Diagnostics Agent and download the SapAgentConfig.xml file

37

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

There should be destination and action elements for the Tomcat Server.

<destination class="com.sap.smd.wily.hostagent.destination.FileDestination" name="wdfd00291023a_8005"> <property name="path" value="C:/APACHE/Tomcat/Tomcat6.0.33/gcTomcat.gc" /> </destination>

<action prefix="SAP GC|wdfd00291023a_8005" name="SAP GC|wdfd00291023a_8005" destination="wdfd00291023a_8005" template="SapGC" />

GC log file path for Tomcat in Landscape Browser The path to the JVM GC log file is reported automatically for Tomcat by the SLD Data Supplier. To check that the value is available in the LMDB, open the Landscape Browser and inspect the properties of JVM object.

38

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

39

END-TO-END RCA SETUP GUIDE FOR APACHE TOMCAT

Additional information
URL http://wiki.sdn.sap.com/wiki/display/SMSETUP http://wiki.sdn.sap.com/wiki/display/TechOps/RCA_Home https://service.sap.com/instguides SAP Components SAP Solution Manager Release 7.1 SAP Note 1508421 SAP Note 1438005 Title SAP Solution Manager Setup Wiki Root Cause Analysis Wiki Solution Manager Installation Guides

SAP SLD Data Supplier for Apache Tomcat Wily Introscope Agent for Apache Tomcat server Inst. 7.30 - Diagnostics Agent installation

SAP Note 1448655

40

www.sap.com

2012 SAP AG. All rights reserved. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company. Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc. Sybase is an SAP company. Crossgate, m@gic EDDY, B2B 360, and B2B 360 Services are registered trademarks of Crossgate AG in Germany and other countries. Crossgate is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.