Bug 206242 - /usr/bin/dtomcat5 makes it hard to spawn multiple tomcat instances
/usr/bin/dtomcat5 makes it hard to spawn multiple tomcat instances
Product: Fedora
Classification: Fedora
Component: tomcat5 (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Vivek Lakshmanan
Depends On:
  Show dependency treegraph
Reported: 2006-09-13 03:13 EDT by Bryce Nesbitt
Modified: 2008-01-05 08:38 EST (History)
0 users

See Also:
Fixed In Version: 5.5.25
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-01-05 08:38:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bryce Nesbitt 2006-09-13 03:13:06 EDT
It is pretty common to want to spawn multiple instances of tomcat, one per
virtual server.

fc5 makes doing this uncessarily intrusive onto the system scripts.  A typical
setup elsewhere is to set $CATALINA_HOME=/var/foo/tomcat_instance_X, then call
startup.sh or catalina.sh.

But with fc5 those scripts have been replaced with /usr/bin/dtomcat5, which
hardwires /etc/tomcat5/tomcat5.conf.  While you can set $CATALINA_BASE
externally, there is no clean way to set $CATALINA_HOME without hacking

Proposd Solution
The config file should be a parameter to /usr/bin/dtomcat5, replacing the
hard-wired TOMCAT_CFG="/etc/tomcat5/tomcat5.conf".

The procedure to spawn multiple tomcats would then to clone
/etc/rc.d/init.d/tomcat5, and set the path for each instance.
Comment 1 Bryce Nesbitt 2006-09-13 14:46:00 EDT
Same issue here:
dtomcat5 allows overriding $CATALINA_PID:

if [ -z "$CATALINA_PID" ] ; then
    export CATALINA_PID=/var/run/tomcat5.pid

But the value from /etc/tomcat5/tomcat5.conf always overrides whatever the user
has exported (e.g. export CATALINA_PID=/var/run/tomcat5_a.pid ).
Comment 2 Devrim GUNDUZ 2008-01-05 08:38:16 EST
I think this is fixed in the current releases. Closing this bug:

if [ -z "$CATALINA_HOME" ]; then
    [ -r "$TOMCAT_CFG" ] && . "${TOMCAT_CFG}"

... etc.

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