Changing of location of catalina.pid for tomcat

user2604979 picture user2604979 · Jul 21, 2013 · Viewed 36.4k times · Source

"catalina.pid" is not in the "tomcat/bin" folders where it should be and it isn't created there during tomcat starting. The question is how (where) i can redefine path to "catalina.pid" to force it to be created in a right folder.

Thanks in advance,

Answer

Mike picture Mike · Feb 25, 2014

Depending on the installation of tomcat, I have seen instances where catalina.pid is not defined. In this case, shut down tomcat, and define it yourself thusly:

In tomcat/bin/setenv.sh, add this line:

CATALINA_PID="$CATALINA_BASE/bin/catalina.pid"

or for windows (in setenv.bat): set CATALINA_PID=%CATALINA_HOME%/bin/catalina.pid

This will define and create the pid file in the tomcat/bin folder, assuming your CATALINA_HOME is defined as your tomcat folder. However, you may also change the location of the pid file, by just changing the path above.