https://bz.apache.org/bugzilla/show_bug.cgi?id=62117
Bug ID: 62117 Summary: catalina.sh contains misleading error message Product: Tomcat 8 Version: 8.5.x-trunk Hardware: PC OS: Linux Status: NEW Severity: minor Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: mark.morschhaeu...@dsa.de Target Milestone: ---- catalina.sh contains the following snippet: ---- kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1 if [ $? -gt 0 ]; then echo "PID file found but no matching process was found. Stop aborted." exit 1 fi ---- Sending the signal 0 to a given PID checks if - any process with the given PID is running *and* - you have the permission to send a signal to it. Now assume the tomcat process was running as root and the catalina.sh is executed as user tomcat. Then the file $CATALINA_PID exists (as well as the process) but kill -0 returns an error because the tomcat user has no permissions to kill the root process. So the message is incomplete, thus misleading. The error message should instead be like "PID file found but either no matching process was found or no permission to stop the process. Stop aborted." This problem not only exists in Tomcat 8.x but also in the source trunk and in Tomcat 9. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org