000028174 - KB-1251 - How to move location of catalina.pid file

Document created by RSA Customer Support Employee on Jun 14, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000028174
Applies ToAffected Versions: 3.6.X
ResolutionThe ACM application defines the environment variable CATALINA_PID, in /home/oracle/setDeployEnv.sh, which gets executed at oracle user login. Files located in /tmp can be deleted periodically by OS. If the /tmp/catalina.pid file is deleted after the ACM server has been started and before it is shutdown, the following error can be seen on server shutdown. (Note that the Server still shuts down, in spite of the error).

$ sudo service aveksa_server stop

Stopping Aveksa Compliance Manager Server: Using CATALINA_BASE: /usr/bin/tomcat

Using CATALINA_HOME: /usr/bin/tomcat

Using CATALINA_TMPDIR: /usr/bin/tomcat/temp

Using JRE_HOME: /usr/bin/jdk1.5.0_06

cat: /tmp/catalina.pid: No such file or directory

Killing:

cat: /tmp/catalina.pid: No such file or directory

kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]


To avoid this error, it is possible to re-define CATALINA_PID in the catalina.sh file, which supercedes the definition in setDeployEnv.sh (This minimizes the possiblity that this change will be undone due to any ACM application updates).
1) Stop the Aveksa Agent and Server
$ sudo service aveksa_agent stop
$ sudo service aveksa_server stop

2) Edit the file /usr/bin/apache-tomcat-5.5.12/bin/catalina.sh and add these two lines, after the front comment section where the environment variables are described, and before the start of the remaining shell script entries:
# Catalina PID file is needed for stop -force to not incurr error
export CATALINA_PID=/var/run/catalina.pid


ex.

# CATALINA_PID (Optional) Path of the file which should contains the pid

# of catalina startup java process, when start (fork) is used

#

# $Id: catalina.sh,v 1.20 2005/04/28 12:32:05 remm Exp $

# -----------------------------------------------------------------------------



# Catalina PID file is needed for stop -force to not incurr error
export CATALINA_PID=/var/run/catalina.pid


3) Start the Aveksa Agent & Server

$ sudo service aveksa_server start
$ sudo service aveksa_agent start

Note: Please be aware that future updates of this file (because of updates to Tomcat Server) may overwrite this edit, and the change may need to be re-implemented.  

Attachments

    Outcomes