https://bugzilla.redhat.com/show_bug.cgi?id=1147105
Bug ID: 1147105
Summary: CATALINA_OPTS are only read when SECURITY_MANAGER is
true
Product: Fedora
Version: 20
Component: tomcat
Assignee: ivan.afonichev(a)gmail.com
Reporter: awood(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: ivan.afonichev(a)gmail.com,
java-sig-commits(a)lists.fedoraproject.org,
krzysztof.daniel(a)gmail.com
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?
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug
https://bugzilla.redhat.com/token.cgi?t=H3lP9UbWQ1&a=cc_unsubscribe