Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1466026

Summary: JVM options are duplicated after service restart
Product: [Fedora] Fedora EPEL Reporter: Coty Sutherland <csutherl>
Component: tomcatAssignee: Coty Sutherland <csutherl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: el6CC: alee, coolsvap, csutherl, ivan.afonichev
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tomcat-7.0.96-1.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-12 02:10:25 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:

Description Coty Sutherland 2017-06-28 19:10:32 UTC
This only happens when shell expansion is used in tomcat.conf.

To reproduce:

1) Add some shell expansion to tomcat*.conf

$ echo "JAVA_OPTS=\"${JAVA_OPTS} -Xms1m\"" >> /etc/tomcat/tomcat.conf

2) Start tomcat and verify that there's only one instance of the Xms argument

$ service tomcat8 start
$ ps aux | grep tomcat | grep -o \\-Xms1m
-Xms1m

3) Restart tomcat to duplicate the JAVA_OPTS

$ service tomcat8 restart

4) Verify that there are multiple Xms args with ps

$ ps aux | grep tomcat | grep -o \\-Xms1m
-Xms1m
-Xms1m

This is because when using restart the stop and start are called in the same script and the parseOptions reads the configuration files twice instead of once to just start/stop the service.

Comment 2 Coty Sutherland 2017-06-28 19:11:29 UTC
Typo in the description: s/tomcat8/tomcat/

Comment 4 Fedora Update System 2019-09-26 19:16:27 UTC
FEDORA-EPEL-2019-31adca066b has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-31adca066b

Comment 5 Fedora Update System 2019-09-27 03:15:00 UTC
tomcat-7.0.96-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-31adca066b

Comment 6 Fedora Update System 2019-10-12 02:10:25 UTC
tomcat-7.0.96-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.