Bug 1472950

Summary: shutdown_wait option is not working for Tomcat
Product: Red Hat Enterprise Linux 7 Reporter: Prageetika Sharma <pragshar>
Component: tomcatAssignee: Coty Sutherland <csutherl>
Status: CLOSED ERRATA QA Contact: Jan Onderka <jonderka>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: csutherl, cww, mbabacek, ovasik
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1557362 (view as bug list) Environment:
Last Closed: 2019-08-06 13:05:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1557362, 1594286, 1654731    

Description Prageetika Sharma 2017-07-19 16:18:25 UTC
Description of problem:
The shutdown wait option for Tomcat is not working for RHEL7 servers.

Version-Release number of selected component (if applicable):

tomcat-7.0.69-11.el7_3.noarch

How reproducible:


Steps to Reproduce:
1. Install the tomcat
2. Set SHUTDOWN_WAIT in /usr/share/tomcat/conf/tomcat.conf
##########################################
# Time to wait in seconds, before killing process
# TODO(stingray): does nothing, fix.
SHUTDOWN_WAIT="30"
SHUTDOWN_VERBOSE="true"
##########################################
3. Restart Tomcat

Actual results:

Tomcat shutdown immediately. 

Expected results:

Tomcat should wait for 30 sec before shutting down.

Additional info:

Comment 2 Coty Sutherland 2017-09-18 15:43:15 UTC
> # Time to wait in seconds, before killing process

The comment in the conf file is wrong...

First, SHUTDOWN_WAIT is the amount of time that the tomcat script waits AFTER it submits a shutdown before it kills the process. Second, this doesn't apply to systemd's service unit and that comment/variable should be removed from the configuration. You can use https://www.freedesktop.org/software/systemd/man/systemd.service.html#TimeoutStopSec= instead, which defaults to 90s instead of tomcat's previous SHUTDOWN_WAIT of 30s.

Comment 3 Coty Sutherland 2018-03-16 13:37:27 UTC
I can fix the comment in the conf file and maybe switch to using TimeoutStopSec (if that works the way I think it does).

Comment 9 Coty Sutherland 2019-03-01 21:45:31 UTC
I updated the comment in tomcat.conf and tomcat's sysconfig files to state that SHUTDOWN_WAIT is deprecated and suggest that users use TimeoutStopSec instead. I didn't add TimeoutStopSec to the systemd service unit because it's been this way for quite a long time and nobody has complained until now, so users can add (and probably already have added) it on their own.

Additionally, I took the opportunity to cleanup the sysconfig file a bit more and remove the following deprecated variables (in addition to SHUTDOWN_WAIT): TOMCAT_USER, SHUTDOWN_VERBOSE, and CONNECTOR_PORT. These variables were leftover from the sysV script and should have been removed when we switched over to systemd.

Comment 13 errata-xmlrpc 2019-08-06 13:05:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:2205