-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jetty.sh does not stop jetty anymore #10271
Comments
Thank you for the detailed issue, and initial triage. I think having Jetty itself produce the pid file is going to be the safest solution. |
+ Have jetty.sh use --pid-file=<name> too Signed-off-by: Joakim Erdfelt <[email protected]>
@l-cdc what kind of environment are you running in which doesn't have |
Ah! there we go ...
|
@joakime I tested the branch |
* Issue #10271 - new jetty-home module `pid` Signed-off-by: Joakim Erdfelt <[email protected]>
Jetty version(s)
10.0.15
Java version/vendor
(use: java -version)
openjdk version "11.0.19" 2023-04-18 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.19.0.7-1.el7_9) (build 11.0.19+7-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.19.0.7-1.el7_9) (build 11.0.19+7-LTS, mixed mode, sharing)
OS type/version
Red Hat Enterprise Linux Server release 7.9 (Maipo)
Description
This bug was likely introduced by #9309 which introduces
xargs
to launchjava
. The relevant lines are$!
now returns the PID of thexargs
process, not the java one. Consequently,jetty.sh stop
now stopsxargs
, but at least on my system killingxargs
(version "xargs (GNU findutils) 4.5.11") does not terminate its child processes.Note also that on systems with
start-stop-daemon
, this probably works asstart-stop-daemon
writes the child PID in the PID file if I understand the man page correctly.The probably simplest (not best) way to fix this is to retrieve the correct PID with something like
How to reproduce?
Issue should appear with unmodified jetty distribution on any system without
start-stop-daemon
.The text was updated successfully, but these errors were encountered: