Bug 1224515 - default for tomcat temp folder on multiple instances should be ${catalina.base}/temp
Summary: default for tomcat temp folder on multiple instances should be ${catalina.bas...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: tomcat
Version: 21
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Ivan Afonichev
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-23 22:34 UTC by Edward
Modified: 2015-12-02 18:04 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-02 12:52:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Edward 2015-05-23 22:34:23 UTC
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

2. Create catalina base folders (and contents), conf, work, temp, webapps under /var/lib/tomcats/instance1

3. systemctl start tomcat

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
+

Comment 1 Fedora End Of Life 2015-11-04 11:50:55 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2015-12-02 12:52:30 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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