Bug 695284
| Summary: | catalina.out path hard-coded in /usr/sbin/tomcat6 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Jeremy Sowden <jeremy> | ||||||
| Component: | tomcat6 | Assignee: | David Knox <dknox> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | qe-baseos-daemons | ||||||
| Severity: | low | Docs Contact: | |||||||
| Priority: | high | ||||||||
| Version: | 6.0 | CC: | awnuk, borgan, ddumas, jclere, jdennis, joshua, jscotka, roysjosh, syeghiay | ||||||
| Target Milestone: | rc | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | noarch | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | tomcat6-6.0.24-33.el6 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | |||||||||
| : | 701759 (view as bug list) | Environment: | |||||||
| Last Closed: | 2011-05-19 10:58:49 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 701759 | ||||||||
| Attachments: |
|
||||||||
Fixed in tomcat6-6.0.24-26.el6_0 Created attachment 495622 [details]
proposed patch for initscript
Created attachment 495623 [details]
proposed patch for wrapper (/usr/sbin/tomcat6)
makeHomeDir should create and link the log directory when ${CATALINA_HOME} directory does not exist. I found makeHomeDir does indeed create /var/log/${NAME} but doesn't link ${CATALINA_HOME}/logs.
*** Bug 697504 has been marked as a duplicate of this bug. *** The wrapper now takes two arguments. The second argument is ${TOMCAT_LOG}. Changes were made to the zstream earlier and have been made in tomcat6-6.0.24-33.el6.
Hi David: I think the proposed init patch has the same issues discussed in bug 697504. Good catch on the makeHomeDir function. I took a quick look at makeHomeDir and my first impression is it seems a bit dubious, possibly a relic from systems which are not RPM based. I'll have to spend a bit more time understanding in detail what it's attempting to accomplish. I'll follow up tomorrow. Also, just noticed another problem (at least in the f15 branch) the login shell is /bin/sh not /sbin/nologin despite the comment for 0:6.0.30-6. (Yes I realize this is a RHEL bz) Hi, the bug with login shell is solved by: 678671 and I've tested it earlier, now I've tests it with .30 and seems that no regression back: tomcat:x:91:91:Apache Tomcat:/usr/share/tomcat6:/sbin/nologin From my point of view, nologin shell is okay Honza re comment #14 I committed the sin of making a comment about another distribution in this bug, sorry if that was confusing :-) The login shell bug is now filed against F15 in bug 701038 re comment #27 Thank you David, sounds good. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-0791.html |
Description of problem: In /usr/sbin/tomcat6 the output from org.apache.catalina.startup.Bootstrap is redirected to catalina.out. When $1 is "start," the path is ${CATALINA_BASE}/logs/catalina.out; when $1 is "start-security" or "stop." the path is /var/log/tomcat6/catalina.out. Version-Release number of selected component (if applicable): tomcat6-6.0.24-24.el6_0.noarch How reproducible: Start and stop tomcat as another user than tomcat with an alternative $CATALINA_BASE. Steps to Reproduce: 1. Clone $CATALINA_BASE: ( cd /usr/share && tar chf - tomcat6 ) | ( cd /tmp && tar xf - ) 2. Start tomcat: CATALINA_BASE=/tmp/tomcat6 /usr/sbin/tomcat6 start 3. Stop tomcat: CATALINA_BASE=/tmp/tomcat6 /usr/sbin/tomcat6 stop Actual results: Failed attempt to append output to /var/log/tomcat6/catalina.out: /usr/sbin/tomcat6: line 62: /var/log/tomcat6/catalina.out: Permission denied Expected results: Sueccesful attempt to append output to $CATALINA_BASE/catalina.out Additional info: