Debugging SAS Enterprise Session Monitor

SAS Enterprise Session Monitor Log files

The SAS Enterprise Session Monitor Server log generates two log files: one for the application JVM, and one for the embedded database.

SAS Enterprise Session Monitor Server JVM Log

By default, the SAS Enterprise Session Monitor Server log file is located under the logs path of the GlassFish application server instance inside the SAS Enterprise Session Monitor Server directory:

/pub/esm/esm-server/esm-core/glassfish/domains/domain1/logs/
C:\esm\esm-server\logs

By default, minimal logging is enabled for SAS Enterprise Session Monitor Server to ensure optimum performance running of production environments. More detailed logging can be enabled with the assistance of SAS Technical Support.

SAS Enterprise Session Monitor Server Database Log

By default, the SAS Enterprise Session Monitor Database log file is located under the logs path of the embedded PostgreSQL database instance inside the SAS Enterprise Session Monitor Server directory:

/pub/esm/esm-server/pgsql/logs

By default, minimal logging is enabled for both the JVM and the Database, to ensure maximum performance in Production Environment workloads. More detailed logging can be enabled with the assistance of SAS Technical Support.

SAS Enterprise Session Monitor Agent Log Files

If the SAS Enterprise Session Monitor Agent fails to connect to the SAS Enterprise Session Monitor Server, the SAS Enterprise Session Monitor Agent log file can be inspected for further information. If required, increased logging can be enabled for further debugging. SAS Technical Support will assist in debugging and may request these log files when providing support.

Log files are located in the logs subdirectory of the agent installation directory, and the logfiles are prefixed with the hostname of the machine on which the agent is installed. The logfile for a given instance of the agent is also output as part of a successful startup:

/filesystem/esm/esm-agent/bin/esm-agent.sh start

Checking connection between SAS Enterprise Session Monitor Agent and SAS Enterprise Session Monitor Server...
Connection to apps.boemskats.com:18080 succeeded!
Starting SAS Enterprise Session Monitor Agent...
Log file: '/pub/esm/esm-agent/logs/node1_wrapper.log'
Agent started. (pid 3327)

By default, the Agent will keep a rotation of 5 logfiles, up to a maximum size of 100mb per logfile. This, alongside other logging parameters, can be configured by modifying esm-agent\conf\wrapper.conf. Further information on the logging parameters specified within this file can be found by referring to the official Tanuki Java Service Wrapper documentation, or by contacting SAS Technical Support.

Agent fails to start

If on starting the agent the following message is displayed:

[user@node1 bin]$ ./esm-agent.sh start

Checking connection between ESM Agent and ESM Server...
Checking connection between ESM Agent and ESM Server(2)...
Checking connection between ESM Agent and ESM Server(3)...
Checking connection between ESM Agent and ESM Server(4)...
Checking connection between ESM Agent and ESM Server(5)...
Could NOT connect to ESMServer:18080.
Did you forgot to open port 18080 on ESMServer or your ESM server was not started?
Check if server and port are correct in /filsesystem/esm/esm-agent/conf/esmconfig.sh
----------------------------------------------------
NOTE: Check if your server is started and try again!

This may be caused by a number of issues:

  1. SAS Enterprise Session Monitor server not started
    Please ensure the SAS Enterprise Session Monitor server is started before bringing up your agent

  2. Communications port (default 18080) not accessible
    Please ensure any firewalls between your server and agent(s) have been configured to allow communication on the configured SAS Enterprise Session Monitor port

  3. Incorrect SAS Enterprise Session Monitor server hostname specified in agent configuration
    Please ensure the correct SAS Enterprise Session Monitor server hostname/IP address is specified in the Agent configuration. If this is incorrect, either restart the Agent installation process, or ensure that the correct hostname or IP address is set as the ESMSERVER variable in esm-agent/conf/esmconfig.sh.

Agent fails to pick up Events sent by SAS

When a SAS Enterprise Session Monitor agent for a given host first connects to the SAS Enterprise Session Monitor server, the server registry stores the initial configured value for the events directory in the database. Every subsequent time that the agent connects, any events location already stored by the SAS Enterprise Session Monitor server overrides the ESMEVENTS parameter specified in esmconfig.sh.

If a SAS Enterprise Session Monitor Agent running on the same hostname has previously connected to the SAS Enterprise Session Monitor server, but the install location has changed from the initial install, the events directory setting from the previous installation may override the location configured as part of the most recent installation. If this is suspected, it is important to verify that the SAS Enterprise Session Monitor events directory specified for that host in the SAS Enterprise Session Monitor Admin screen is correct. If it is not, the previous configuration can be removed by clicking on the icon in the list of configured agents on the SAS Enterprise Session Monitor Admin Screen.

For more information about the SAS Enterprise Session Monitor Admin Screen, review the SAS Enterprise Session Monitor Administration Guide.

Agent Connection Failure

If during installation, the SAS Enterprise Session Monitor agent fails to connect to the SAS Enterprise Session Monitor server, please take the following steps.

  • Ensure the server settings in the installation wizard match those of the SAS Enterprise Session Monitor server to which the agent is reporting in to, and that the target server is running.

  • To check the target server is running, use a web browser to connect to your SAS Enterprise Session Monitor server web client (e.g. http://esmserver:18080/esm) or check the SAS Enterprise Session Monitor Server Administration guide for further information. Also ensure that any firewall is configured to allow TCP traffic between the agent and server on the specified port number.

Agent Service Fails to Start

If during a Windows installation, or at any other stage the SAS Enterprise Session Monitor Agent service fails to start, this may be due to a permissions issue. The following message may be displayed when starting the SAS Enterprise Session Monitor Agent service at a command prompt:

Hostname detected: WIN2008R2N1
wrapper  | Starting the ESM Agent service...
wrapper  | Unable to start the service – Access is denied. (0x5)
Press any key to continue . . .

Note

For further details on using the command line to control the SAS Enterprise Session Monitor Agent service see Starting and Stopping the SAS Enterprise Session Monitor Agent service

To resolve this issue, the appropriate account with the relevant level of access is required to be specified in the “Log on as” properties of the Windows Service configuration. To specify the correct account and password, complete the following steps:

  1. Click Start

  2. In the search box type services to filter the list of applications

  3. Right Click Services and click Run as Administrator

  4. In the services window which appears, scroll down the list to the “ESM Agent” entry and right click, selecting Properties from the context menu

  5. Click the Log On tab

  6. Select the This account radio button and specify the relevant account with the required privileges, together with the valid password. Specify the full account, with domain name, (e.g. DOMAIN\Account).

  7. Click Apply followed by OK

  8. The SAS Enterprise Session Monitor Agent service can be started from the services menu by right clicking it and selecting Start from the context menu

  9. The SAS Enterprise Session Monitor Agent service should now start and report in to the SAS Enterprise Session Monitor Server.

  10. To check the target server is running, use a web browser to connect to your SAS Enterprise Session Monitor server web client (e.g. http://esmserver:18080/esm)

If the service fails to start after following these steps, firstly verify you have the correct credentials in the 'This account' section of the 'Log On' tab. For further details on why the service may have failed to start, please inspect the agent log file (see the Agent Administration section of this guide. For further help please contact SAS Technical Support.