Growing tomcat log file due to exception messages
search cancel

Growing tomcat log file due to exception messages

book

Article ID: 112634

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

The tomcat log file (Windows=stdout.log / Linux=catalina.out) in $SPECROOT/tomcat/logs folder grows quickly. The following message is shown frequently in the tomcat log file:

org.apache.catalina.core.StandardWrapperValve invoke 
SEVERE: Servlet.service() for servlet [jsp] in context with path [/spectrum] threw exception [java.lang.NullPointerException] with root cause 
java.lang.NullPointerException

Environment

LoadBalancer managing Spectrum OneClick Servers

Cause

The LoadBalancer is configured to send health requests/checks to the Spectrum server to see if the tomcat is still up and running. This check looks like this:

GET /spectrum/console/install-java.jsp HTTP/1.1\r\nHost: localhost\r\nConnection: Close\r\n\r\n

Since the check did not include the user-agent it has created an exception in tomcat log file.

Resolution

Removing or altering this check is avoiding the exception message. For example this health check is not creating the log entries but is still checking if the OneClick Server is alive:

GET /spectrum/admin/index.jsp HTTP/1.1\r\nHost: localhost\r\nConnection: Close\r\n\r\n