Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionMichael McEniry
2011-10-31 21:30:46 UTC
Created attachment 531044[details]
change condition to check for existence of CATALINA_HOME
Description of problem:
/etc/init.d/tomcat6 has a bad condition check when using an alternative CATALINA_HOME. Specifically, during start(), it checks to see if "$CATALINA_HOME" does not match "/usr/share/tomcat6", in which case it calls makeHomeDir() and then *always* runs sed to change port numbers in server.xml (even though the comments suggest this should happen only if CATALINA_HOME does not exist).
An alternative CATALINA_HOME is necessary when multiple tomcat instances need different .../lib contents.
Version-Release number of selected component (if applicable):
tomcat6-6.0.24-33.el6.noarch
How reproducible:
Always when using an alternative CATALINA_HOME
Steps to Reproduce:
1. Create a new tomcat instance using an alternative CATALINA_HOME. (too many steps to list--the stupid makeHomeDir() function should handle this but does not)
2. Check timestamp of server.xml (even create a copy of it if you like).
3. Start the new tomcat instance.
3. Check new timestamp of server.xml. If you made a copy, then diff the 2 files to see if any of the port numbers (8005, 8009, 8080, 8443) changed.
Actual results:
New timestamp for server.xml.
Expected results:
Old timestamp for server.xml.
Additional info:
The attached patch changes the condition to check for existence of CATALINA_HOME.
Comment 2RHEL Program Management
2011-10-31 21:49:03 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.
If you are creating a different tomcat instances you should be modifying CATALINA_BASE not CATALINA_HOME.
The reason is because CATALINA_BASE is the per-instance area and CATALINA_HOME is the package install area (which needs to be preserved). CATALINA_BASE overrides portions of CATALINA_HOME. You set CATALINA_BASE in /etc/sysconfig/$NAME
This should be closed as NOT A BUG.
Now, on the other hand is makeHomeDir() ill conceived? Yes. I believe in some versions of the tomcat6 packages (perhaps in Fedora) it was removed. David would be able to elaborate. But that's a separate issue from this bug.
What is stated in Comment 3 is correct.
CATALINA_HOME should point to the installation, and CATALINA_BASE points to the instance locations {conf, webapps, work, temp}.
No one should depend on makeHomeDir. The systemv scripts should have never taken on the responsibility of creating additional instances. Especially now when systemv is being retired and systemd scripts are the default for the fedora tomcat6 (rawhide, f16, f15). The systemd scripts don't use makeHomeDir. Instead the user must copy the correct directories and set CATALINA_HOME and CATALINA_BASE correctly. In the case of systemd, there must also be a service file to match the new tomcat service.
Perhaps in the near future we can provide a script to automate most of the tasks involved with creating additional services. But that would be a seperate bz and would be prioritized against other open bzs.
I'm closing this as it is NOTABUG
Created attachment 531044 [details] change condition to check for existence of CATALINA_HOME Description of problem: /etc/init.d/tomcat6 has a bad condition check when using an alternative CATALINA_HOME. Specifically, during start(), it checks to see if "$CATALINA_HOME" does not match "/usr/share/tomcat6", in which case it calls makeHomeDir() and then *always* runs sed to change port numbers in server.xml (even though the comments suggest this should happen only if CATALINA_HOME does not exist). An alternative CATALINA_HOME is necessary when multiple tomcat instances need different .../lib contents. Version-Release number of selected component (if applicable): tomcat6-6.0.24-33.el6.noarch How reproducible: Always when using an alternative CATALINA_HOME Steps to Reproduce: 1. Create a new tomcat instance using an alternative CATALINA_HOME. (too many steps to list--the stupid makeHomeDir() function should handle this but does not) 2. Check timestamp of server.xml (even create a copy of it if you like). 3. Start the new tomcat instance. 3. Check new timestamp of server.xml. If you made a copy, then diff the 2 files to see if any of the port numbers (8005, 8009, 8080, 8443) changed. Actual results: New timestamp for server.xml. Expected results: Old timestamp for server.xml. Additional info: The attached patch changes the condition to check for existence of CATALINA_HOME.