Bug#948553: Tomcat9 startup script ignores CATALINA_PID

Stephane Tranchemer stephane.tranchemer at asahinet.com
Fri Jan 10 05:07:48 GMT 2020


Package: tomcat9
Version: 9.0.16-4

In debian 10 (buster)

/usr/share/tomcat9/bin/catalina.sh is ignoring the CATALINA_PID
variable therefore does not generate a PID file accordingly.

example startup command :

set -a; JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"; source
"/etc/default/tomcat9"; CATALINA_HOME="/usr/share/tomcat9";
CATALINA_BASE="/var/lib/tomcat9"; JAVA_OPTS="-Djava.awt.headless=true
-server -Xmx1280M -Xms1280M -Xss2M -Dfile.encoding=EUC-JP
-XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/volatile/dump/db2-11-test2 -Dcom.atson.test=true
-Dcom.atson.local=false -Dcom.atson.webapp=true
-Dcom.atson.useDB2Type4=false -Dcom.atson.useDataSourceResource=true
-Dcom.atson.XLINK_VIA_GW=true"; \ CATALINA_PID="/var/run/tomcat9.pid";
CATALINA_TMPDIR="/tmp/tomcat9-tomcat9-tmp"; LANG="C.UTF-8";
JSSE_HOME=""; cd "/var/lib/tomcat9";
"/usr/share/tomcat9/bin/catalina.sh" start

The origin of the problem can be found in this line (actually 2 identical
lines) :

2\>\&1 \&\& echo \$! \>\"$catalina_pid_file\" \; \} $catalina_out_command "&"

with this change it works as expected :

-2\>\&1 \&\& echo \$! \>\"$catalina_pid_file\" \; \}
$catalina_out_command "&" +2\>\&1 \& echo \$! \>\"$catalina_pid_file\"
\; \} $catalina_out_command "&"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-maintainers/attachments/20200110/6f6188b8/attachment.html>


More information about the pkg-java-maintainers mailing list