Bug 426850 - tomcat5 does not start
tomcat5 does not start
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: tomcat5 (Show other bugs)
7
All Linux
low Severity high
: ---
: ---
Assigned To: Devrim GUNDUZ
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 551267
  Show dependency treegraph
 
Reported: 2007-12-27 06:48 EST by Thomas Schweikle
Modified: 2009-12-29 13:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 5.5.26-1jpp.2.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 551267 (view as bug list)
Environment:
Last Closed: 2008-02-12 23:54:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Thomas Schweikle 2007-12-27 06:48:32 EST
Description of problem:
tomcat does not start: /var/log/tomcat5/cacalina.out holds:
Using CATALINA_BASE:   /usr/share/tomcat5
Using CATALINA_HOME:   /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JRE_HOME:       
touch: kann „/usr/share/tomcat5/logs/catalina.out“ nicht berühren: Keine 
Berechtigung
/usr/bin/dtomcat5: line 325: /usr/share/tomcat5/logs/catalina.out: Keine 
Berechtigung


Version-Release number of selected component (if applicable):
tomcat5-5.5.25-1jpp.1.fc7

How reproducible:
always

Steps to Reproduce:
1. Install tomcat5
2. rm -rf /var/log/tomcat5/*
3. /etc/init.d/tomcat5 start
  
Actual results:
Tomcat doesn't start because root creates the file "/var/log/tomcat5/
catalina.out" and after tomcat switching to user tomcat, group tomcat it 
looses access to "catalina.out".

Expected results:
The init script has to
- check if /var/log/tomcat5/catalina.out exists
  if not: create it
- check if owner is the one tomcat will run as
  if not: change owner
- check if group is the one tomcat will run as
  if not: change group

The init script does not do any of these checks.


Additional info:
--- tomcat5.old 2007-12-27 12:44:16.000000000 +0100
+++ tomcat5     2007-12-27 12:41:29.000000000 +0100
@@ -64,9 +64,16 @@
 # Define the tomcat username
 TOMCAT_USER="${TOMCAT_USER:-tomcat}"
 
+# Define the tomcat group
+TOMCAT_GROUP="${TOMCAT_GROUP:-tomcat}"
+
 # Define the tomcat log file
 TOMCAT_LOG="${TOMCAT_LOG:-/var/log/tomcat5/catalina.out}"
 
+test -e $TOMCAT_LOG || touch $TOMCAT_LOG
+chown $TOMCAT_USER:$TOMCAT_GROUP $TOMCAT_LOG
+
+
 RETVAL="0"
 
 # remove when the RHEL and FC daemon functions converge


The same problem is with
- Fedora 7
- Fedora 8
- Fedora 8.90
- CentOS 4+
- CentOS 5, 5.1
- RHEL 5, 5.1
Comment 1 Devrim GUNDUZ 2008-01-05 07:10:16 EST
Thanks for the report. The fix will appear in next tomcat build.
Comment 2 Fedora Update System 2008-01-06 20:23:43 EST
tomcat5-5.5.25-2jpp.1.fc8 has been pushed to the Fedora 8 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 'yum --enablerepo=updates-testing update tomcat5'
Comment 3 Fedora Update System 2008-01-06 20:28:21 EST
tomcat5-5.5.25-2jpp.1.fc7 has been pushed to the Fedora 7 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 'yum --enablerepo=updates-testing update tomcat5'
Comment 4 Fedora Update System 2008-02-08 19:31:40 EST
tomcat5-5.5.26-1jpp.1.fc7 has been submitted as an update for Fedora 7
Comment 5 Fedora Update System 2008-02-08 19:34:46 EST
tomcat5-5.5.26-1jpp.1.fc8 has been submitted as an update for Fedora 8
Comment 6 Fedora Update System 2008-02-12 15:31:41 EST
tomcat5-5.5.26-1jpp.2.fc8 has been submitted as an update for Fedora 8
Comment 7 Fedora Update System 2008-02-12 15:34:04 EST
tomcat5-5.5.26-1jpp.2.fc7 has been submitted as an update for Fedora 7
Comment 8 Fedora Update System 2008-02-12 23:54:35 EST
tomcat5-5.5.26-1jpp.2.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2008-02-13 00:13:54 EST
tomcat5-5.5.26-1jpp.2.fc8 has been pushed to the Fedora 8 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.