From 2c55b899efa047ef6fda40f408b377efcb3827b6 Mon Sep 17 00:00:00 2001 From: Alexandre Garnier Date: Thu, 10 Sep 2015 11:47:06 +0200 Subject: [PATCH] Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58352 Trigger a thread dump to aid diagnostics if Tomcat fails to stop in a timely manner, even if '-force' --- bin/catalina.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/catalina.sh b/bin/catalina.sh index 1d473e5..617ca6a 100755 --- a/bin/catalina.sh +++ b/bin/catalina.sh @@ -487,10 +487,12 @@ elif [ "$1" = "stop" ] ; then sleep 1 fi if [ $SLEEP -eq 0 ]; then + echo "Tomcat did not stop in time." if [ $FORCE -eq 0 ]; then - echo "Tomcat did not stop in time. PID file was not removed. To aid diagnostics a thread dump has been written to standard out." - kill -3 `cat "$CATALINA_PID"` + echo "PID file was not removed." fi + echo "To aid diagnostics a thread dump has been written to standard out." + kill -3 `cat "$CATALINA_PID"` fi SLEEP=`expr $SLEEP - 1 ` done -- 2.5.1