You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2018/02/19 13:17:56 UTC
[Bug 62117] New: catalina.sh contains misleading error message
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.morschhaeuser@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 62117] catalina.sh contains misleading error message
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62117
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Thanks for reporting this. I've updated the message.
Fixed in:
- trunk for 9.0.6 onwards
- 8.5.x for 8.5.29 onwards
- 8.0.x for 8.0.51 onwards
- 7.0.x for 7.0.86 onwards
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org