search cancel

Tomcat does not start after changing the default tomcat log location in Spectrum OneClick

book

Article ID: 190009

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

After upgrading to 21.2.2 from 10.4.2.1, tomcat will not start on various OneClick servers.

Environment

Release : 10.4.1

Component : Spectrum OneClick

Cause

The tomcat log (catalina.out on linux and stdout.log on windows) is not in the default location but has been moved to a new custom location due to local security policies.

Default location is $SPECROOT/tomcat/logs

Resolution

In order for the tomcat log to be placed in a custom location the following changes must be done:

1. The following changes must be made to the $SPECROOT/tomcat/bin/catalina.sh file  on Linux (after backing up the original file) and for windows edit the oneclickservice.conf file.

For the following example on Linux, assume the custom location is changed to /var/log/tomcat/catalina.out

Line 223

JAVA_OPTS="-DOneClick -server -Xmx10000M -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Djavax.net.ssl.trustStore=$SPECROOT/custom/keystore/cacerts -Dfile.encoding=UTF-8 -Dcom.sun.management.jmxremote -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true" 

to

JAVA_OPTS="-DOneClick -server -Xmx10000M -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Djavax.net.ssl.trustStore=$SPECROOT/custom/keystore/cacerts -Dfile.encoding=UTF-8 -Dcom.sun.management.jmxremote -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -DCATALINA_OUT=/var/log/tomcat/catalina.out"


So that the custom location is passed to the CATALINA_OUT


Line 232

 CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out


Must be changed to the custom location, for example

 CATALINA_OUT="/var/log/tomcat/catalina.out"

2. Stop OneClick Tomcat
3a. From 21.2.2 no patch is required.

3b. For Spectrum 10.4.1, apply patch Spectrum_10.04.01.D25a 

3c. For Spectrum 10.4.1 + 10.4.1_BMP_10.4.101b    Apply patch Spectrum_10.04.01.PTF_10.4.128a.

4. Start OneClick Tomcat