[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jpackage-discuss
Subject:    [JPackage-discuss] JPP5.0, RHEL5,
From:       Brett Delle Grazie <brett.dellegrazie () intact-is ! com>
Date:       2010-06-05 15:29:17
Message-ID: 1275751757.2138.1.camel () bdellegrazie-t500
[Download RAW message or body]

Hi,

I'm running multiple instances of tomcat6 using JPP 5.0 binaries on
RHEL5.5

My setup:

/etc/init.d/tc-1 (symlink to tomcat6)
/etc/sysconfig/tc-1 (copy of /etc/sysconfig/tomcat6) with CATALINA_HOME
and CATALINA_BASE set as follows:

I've tried with:
CATALINA_HOME=/usr/share/tc-1    } this is the configuration suggested
by the init script but it is wrong according to tomcat docs
CATALINA_BASE=/usr/share/tomcat6 }

and with:
CATALINA_HOME=/usr/share/tomcat6 } this is the correct way for multiple
instances, I agree variable names are counter-intuitive
CATALINA_BASE=/usr/share/tc-1    }

both fail to start with the correct settings as per the tomcat logs
instead they always start with:
CATALINA_HOME=/usr/share/tomcat6
CATALINA_BASE=/usr/share/tomcat6

There appears to be some problems with the init script
and /usr/sbin/tomcat6 script when using multiple instances.

1) CATALINA_HOME and CATALINA_BASE have had their interpretation
reversed by /etc/init.d/tomcat6
In multiple instance environments its actually CATALINA_BASE that is the
'instance home', not CATALINA_HOME.
CATALINA_HOME should point to /usr/share/tomcat6 according to the
current package layout.

For reference - please refer to RUNNING.txt in tomcat6 distribution,
specifically Advanced Configuration - Multiple Tomcat Instances

This means the init script when making the home directory is looking in
the wrong place.
Worse the values exported to the tomcat startup script
(/usr/sbin/tomcat6) are plain wrong.

2) makeHomeDirs in init script creates the wrong directory structure
according to RUNNING.txt
structure created seems to put:
/usr/share/tc-1/temp/tc-1 (symlink to /var/tmp/tc-1)
/usr/share/tc-1/logs/tc-1 (symlink to /var/logs/tc-1)
/usr/share/tc-1/work/tc-1 (symlink to /var/cache/tc-1)

These should probably be:
/usr/share/tc-1/temp (symlink to /var/tmp/tc-1)
/usr/share/tc-1/logs (symlink to /var/logs/tc-1)
/usr/share/tc-1/work (symlink to /var/cache/tc-1/work)

instead.
This is caused by the cp -pLR command used in the makeHomeDirs script.

3) /usr/sbin/tomcat6 sources TOMCAT_CFG which is not exported by default
and will therefore be /etc/tomcat6/tomcat6.conf.
This overrides any usage of the exported variables that were supplied by
the init script.

For 1) Simply reverse the interpretation of CATALINA_HOME and
CATALINA_BASE

For 3) I'd suggest the following:
A) In /etc/init.d/tomcat6
i) Always export TOMCAT_CFG=/etc/sysconfig/${NAME} during start / stop /
status

B) In /usr/sbin/tomcat6
i) Always import /etc/tomcat6/tomcat6.conf
ii) Always import $TOMCAT_CFG (assuming its not empty)

This avoids any need of the parseOptions in the init script and
maintains compatibility with expected behaviour across
all distributions.

Comments?

I'm happy to raise bugs / provide patches etc.

Thanks,

-- 
Best Regards,

Brett Delle Grazie

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
_______________________________________________
JPackage-discuss mailing list
JPackage-discuss@zarb.org
https://www.zarb.org/mailman/listinfo/jpackage-discuss
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic