Bug 1147105 - CATALINA_OPTS are only read when SECURITY_MANAGER is true
Summary: CATALINA_OPTS are only read when SECURITY_MANAGER is true
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tomcat
Version: 20
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Ivan Afonichev
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-26 22:43 UTC by Alex Wood
Modified: 2015-11-30 21:22 UTC (History)
5 users (show)

Fixed In Version: tomcat-7.0.52-2.fc20 tomcat-8.0.26-2.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-30 21:22:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Alex Wood 2014-09-26 22:43:19 UTC
Description of problem:
The CATALINA_OPTS configuration value is ignored during Tomcat start-up unless the SECURITY_MANAGER configuration value is set to true.  By default SECURITY_MANAGER is set to "false" so this issue can be pretty confusing if you're trying to add to CATALINA_OPTS and nothing happens.

Version-Release number of selected component (if applicable): tomcat-7.0.52-1.fc20.noarch

How reproducible: Always

Steps to Reproduce:
1. Edit /etc/tomcat/tomcat.conf
2. Set CATALINA_OPTS to something.  "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000" for example.
3. Set SECURITY_MANAGER to "false"
3. Restart tomcat.
4. pgrep -fla tomcat

Actual results: The pgrep command reveals that Tomcat is running without the values set in CATALINA_OPTS.

Expected results: CATALINA_OPTS are present.

Additional info: This bug is actually due to the fix to bug 1051194.  In the bugfix, the reading in of CATALINA_OPTS has been moved in /usr/libexec/tomcat/server into a block that requires SECURITY_MANAGER to be true.

if [ "$1" = "start" ] ; then
  if [ "${SECURITY_MANAGER}" = "true" ] ; then
    FLAGS="${FLAGS} $CATALINA_OPTS"
    OPTIONS="${OPTIONS} \
    -Djava.security.manager \
    -Djava.security.policy==${CATALINA_BASE}/conf/catalina.policy"
  fi
  run start

I propose that the flags be read before looking at the security manager settings.  Like

if [ "$1" = "start" ] ; then
  FLAGS="${FLAGS} $CATALINA_OPTS"
  if [ "${SECURITY_MANAGER}" = "true" ] ; then
    OPTIONS="${OPTIONS} \
    -Djava.security.manager \
    -Djava.security.policy==${CATALINA_BASE}/conf/catalina.policy"
  fi
  run start

Possible OPTIONS should be read outside of the block too?

Comment 1 Fedora Update System 2014-10-19 00:58:34 UTC
tomcat-7.0.52-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/tomcat-7.0.52-2.fc20

Comment 2 Fedora Update System 2014-10-19 13:22:59 UTC
Package tomcat-7.0.52-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing tomcat-7.0.52-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-13265/tomcat-7.0.52-2.fc20
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2014-10-23 06:25:11 UTC
tomcat-7.0.52-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 4 Fedora Update System 2015-11-18 00:45:32 UTC
tomcat-8.0.26-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-f9628769a9

Comment 5 Fedora Update System 2015-11-19 15:27:20 UTC
tomcat-8.0.26-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update tomcat'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-f9628769a9

Comment 6 Fedora Update System 2015-11-19 16:55:55 UTC
tomcat-8.0.26-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update tomcat'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-f9628769a9

Comment 7 Fedora Update System 2015-11-30 21:21:59 UTC
tomcat-8.0.26-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.