Bug 206242

Summary: /usr/bin/dtomcat5 makes it hard to spawn multiple tomcat instances
Product: [Fedora] Fedora Reporter: Bryce Nesbitt <bryce1>
Component: tomcat5Assignee: Vivek Lakshmanan <viveklak>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://www.obviously.com/
Whiteboard:
Fixed In Version: 5.5.25 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-05 13:38:16 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:

Description Bryce Nesbitt 2006-09-13 07:13:06 UTC
Issue
-----
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
/usr/bin/dtomcat5.

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 18:46:00 UTC
Same issue here:
dtomcat5 allows overriding $CATALINA_PID:

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

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 13:38:16 UTC
I think this is fixed in the current releases. Closing this bug:

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


... etc.