Enterprise Content Management System Monitor Server Debugging Guide 20.09.2013 CENIT AG Bettighofer, Stefan
1 Table of Contents 1 Table of Contents... 2 2 Overview... 3 3 The Server Status View... 3 4 The Logfiles... 4 4.1 Location... 4 4.2 Logfile Description... 4 4.2.1 ECM SM Server Logs... 4 4.2.2 ECM SM GUI Logs... 5 4.3 Changing the default logfile parameters... 5 4.4 How to enable the OSGi Console after the initial Installation... 7 4.5 Log levels... 7 4.6 Changing the default log level for the ECM SM Server and GUI... 8 4.6.1 via file (service restart required)... 8 4.6.2 via OSGi Console... 9 4.7 Changing the bundle specific logging of the ECM SM Server and GUI... 11 4.7.1 via file (service restart required)... 11 4.7.2 via OSGi Console... 13 2
2 Overview This guide will give an overview on how to debug failures on the ECM SM Server. There are several ways how the health of the system can be checked or where failures are logged. 3 The Server Status View If the default layout of the Event Management Console is used the ECM SM Server Status View is displayed at the bottom left part of the Workspace. The status icon will show the health of the ECM SM Server and GUI. If a bundle of the ECM SM Server is not working, the status will change to a red X and the bundle that is not working is shown in the details view. In case the user has not opened the Event Management Console the ECM SM Server Status view will pop beneath the current activated view. Theses setting can be changed in the User Preferences Editor. 3
4 The Logfiles 4.1 Location All server related logfiles are located in the <install directory>\var\log. Windows e.g.: C:\Program Files(x86)\IBM\ECMSM\var\log Unix e.g.: /opt/ibm/ecmsm/var/log 4.2 Logfile Description 4.2.1 ECM SM Server Logs 4.2.1.1 Server.*.log This is the primary logfile for all server related log entries. Everything related to the event processing and internal server/client communication is logged into this file. The most recent logfile will have the 0 at the end of the name. 4.2.1.2 Server_serviceinst.log.YEAR-MONTH-DAY.log This logfile records all the startup and runtime messages of the ECM SM Server JVM. 4.2.1.3 Server.stdout.log This logfile shows all the messages that the ECM SM Server process would print out to standard out if it would be started on command line. 4.2.1.4 Server.stderr.log This logfile shows all the messages that the ECM SM Server process would print out to standard error if it would be started on command line. 4
4.2.2 ECM SM GUI Logs 4.2.2.1 Gui.*.log This is the primary logfile for all graphical user interface log entries. Everything related to user interactions in the ECM SM GUIs is logged into this file. The most recent logfile will have the 0 at the end of the name. 4.2.2.2 Gui_serviceinst.log.YEAR-MONTH-DAY.log This logfile records all the startup and runtime messages of the ECM SM GUI JVM. 4.2.2.3 Gui.stdout.log This logfile shows all the messages that the ECM SM GUI Process would print out on to standard out if it would be started on command line. 4.2.2.4 Gui.stderr.log This logfile shows all the messages that the ECM SM GUI Process would print out on to standard error if it would be started on command line. 4.3 Changing the default logfile parameters The default parameters for all logfiles are set in the logging.conf configuration file that is located in the <install directory>\server\cfg directory. e.g. Windows: C:\Program Files (x86)\ibm\ecmsm\server\cfg e.g. Unix: /opt/ibm/ecmsm/server/cfg 5
DO NOT CHANGE ANY PARAMETER SHOWN IN THE RED AREA By default the logfiles grow until they reach 10 MB, then a new logfile will be created. If five logfiles are created, the oldest one (for example server.5.log) will be deleted. If the logfiles should reach 15 MB and 10 logfiles should be kept the settings would look like this. Note: A restart of the services is required 6
4.4 How to enable the OSGi Console after the initial Installation If the OSGi ssh based console was not enabled during the initial installation, the config.ini file of component has to be adjusted For the ECM SM Server edit: $INSTALL_ROOT\server\cfg\config.ini For the ECM SM GUI edit: $INSTALL_ROOT\gui\cfg\config.ini At the bottom of these two files, we have to change/\add the following parameters If these parameters are used, the SSH OSGi console binds itself to the port 23960 and is only available from the ECM Server Machine itself. If it is necessary to connect remotely to the OSGi console, insert the IP Address or the FQDN instead of 127.0.0.1. The default Port for the OSGi console of the ECM SM Server is 23960, the default port for the OSGi console of the ECM SM GUI is 23980. IMPORTANT: To avoid an accidental termination of the affected JVM, always close the OSGi console with the disconnect command. 4.5 Log levels The default log level of the ECM SM Server and GUI is ERROR. In case of a troubleshooting it s often required to change this log level. Valid log levels are: ERROR: this log entry indicates the bundle or service may not be functional 7
WARNING: this log entry indicates a bundle or service is still functioning but may experience problems in the future because of the warning condition INFO: this log entry may be the result of any change in the bundle or service and does not indicate a problem DEBUG: this log entry is used for problem determination and may be irrelevant to anyone but the bundle developer 4.6 Changing the default log level for the ECM SM Server and GUI ECM SM offers two different ways to change the default log level. 4.6.1 via file (service restart required) Open the file finca-cfg.xml located in the <install directory>\server\cfg directory. Windows e.g.: C:\Program Files (x86)\ibm\ecmsm\server\cfg\finca-cfg.xml Unix e.g.: /opt/ibm/ecmsm/server/cfg/finca-cfg.xml 8
Navigate to the <functional.logserver> section of the file. Change the value of the default log level to the desired severity. Restart the ECM SM Server or GUI service. Note: This method changes the default log level for both components of the ECM SM. 4.6.2 via OSGi Console Open a SSH connection to the port specified in chapter 4.3 of this document. For this example, we will use putty as SSH client. 9
Log in with the internal admin user. Use the command setdefaultloglevel to change the default log level of the connected ECM SM component (compared to the file method described in chapter 4.5.1) 10
Note: no restart required 4.7 Changing the bundle specific logging of the ECM SM Server and GUI Changing the default log level often causes a high amount of log entries and a rapid growth of the logfile size, it is helpful for situations where the source of the problem is unknown. For more experienced users or if the IBM support identified the affected bundle, it is recommended to increase the log level for the individual bundle only. Like for the default log level ECM SM offers two options for changing the bundle specific log level. 4.7.1 via file (service restart required) Open the file finca-cfg.xml located in the <install directory>\server\cfg directory. Windows e.g.: C:\Program Files (x86)\ibm\ecmsm\server\cfg\finca-cfg.xml Unix e.g.: /opt/ibm/ecmsm/server/cfg/finca-cfg.xml 11
Navigate to the <functional.logserver> section of the file. In this example, the debugging level for both SMTP related bundles will be changed. If there is any problem with the email notification, this would be the first approach to identify the cause. The best ways to edit the file is simply copy and paste the example line called <bundle name="finca.base" level="error" />. Change the bundle names (finca.base) to the ones that need to be debugged and set the log level to DEBUG. 12
Restart the ECM SM Server or GUI 4.7.2 via OSGi Console Open a SSH connection to the port specified in chapter 4.3 of this document. For this example we will use putty as SSH client. 13
Log in with the internal admin user. With the ss command (show status) all bundles will be shown in the OSGi console. It is possible to limit the output of the ss command by adding parts of the bundle names that has to be changed. In this example, there is a problem with the email notification. The bundles we have to change might have the word smtp in its name. 14
The setloglevel <log level> <bundleid> command will change the bundle specific logging to the chosen log level. Note: No restart is required, the changed log level is activated instantly. 15