https://bugzilla.redhat.com/show_bug.cgi?id=1224515
Bug ID: 1224515
Summary: default for tomcat temp folder should be multiple
instances should be ${catalina.base}/temp
Product: Fedora
Version: 21
Component: tomcat
Severity: low
Assignee: ivan.afonichev(a)gmail.com
Reporter: edwardquick(a)hotmail.com
QA Contact: extras-qa(a)fedoraproject.org
CC: alee(a)redhat.com, ivan.afonichev(a)gmail.com,
java-sig-commits(a)lists.fedoraproject.org,
krzysztof.daniel(a)gmail.com, me(a)coolsvap.net
Description of problem:
When a user configures multiple instances of tomcat, the CATALINA_TMPDIR
setting is not updated to match the instance's temp folder.
Version-Release number of selected component (if applicable):
tomcat-7.0.59-1.fc21.noarch
How reproducible:
The default setting in /etc/tomcat/tomcat.conf is
# System-wide tmp
CATALINA_TMPDIR="/var/cache/tomcat/temp"
Steps to Reproduce:
1. systemctl enable tomcat(a)instance1.service
2. Create catalina base folders (and contents), conf, work, temp, webapps under
/var/lib/tomcats/instance1
3. systemctl start tomcat(a)instance1.service
Actual results:
In the tomcat instance1 process, the temp folder is specified as:
-Djava.io.tmpdir=/var/cache/tomcat/temp
Expected results:
The tomcat instance temp folder should be:
-Djava.io.tmpdir=/var/lib/tomcats/instance1/temp
Additional info:
Note we did nothing to configure LOGGING_PROPERTIES, yet the process correctly
specifies it as we expect
-Djava.util.logging.config.file=/var/lib/tomcats/instance1/conf/logging.properties
This issue is easily fixed with the followiing patch to
/usr/libexec/tomcat/preamble
# diff -u /usr/libexec/tomcat/preamble.orig /usr/libexec/tomcat/preamble
--- /usr/libexec/tomcat/preamble.orig 2015-05-23 23:10:14.979921192 +0100
+++ /usr/libexec/tomcat/preamble 2015-05-23 23:14:07.636951751 +0100
@@ -42,3 +42,11 @@
LOGGING_PROPERTIES="${CATALINA_HOME}/conf/logging.properties"
fi
fi
+
+if [ -z "$CATALINA_TMPDIR" ] ; then
+ CATALINA_TMPDIR="${CATALINA_BASE}/temp"
+ if [ ! -d "${CATALINA_TMPDIR}" ] ; then
+ CATALINA_TMPDIR="${CATALINA_HOME}/temp"
+ fi
+fi
+
--
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=niFb9Utlz4&a=cc_unsubscribe