Tomcat does not start after changing the default tomcat log location on the Spectrum OneClick server
search cancel

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

book

Article ID: 190009

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

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

Environment

DX NetOps Spectrum all releases

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.

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. Change the following in the $SPECROOT/tomcat/bin/catalina.sh file  on Linux (after backing up the original file) or under Windows, edit the oneclickservice.conf file. For the following example on Linux, assume the custom location is changed to /var/log/tomcat/catalina.out

    So on Line 223, change:

    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"

  2. So that the custom location is passed to the CATALINA_OUT on Line 232, change

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

    Must be changed to the custom location, for example:

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

  3. Restart OneClick Tomcat