Hello,
System specs (I realize this is an Amazon AMI, but I have a fedora instance with the same issue).
uname -r
2.6.34.7-56.40.amzn1.x86_64
Tomcat 6.0.29
/usr/java/jdk1.6.0_23/bin/java
Thanks for taking the time to take a look at this thread. I'm pretty sure there is a bug in the implementation of multiple tomcat6 instances sharing one tomcat/bin folder.
Here's how I have it working now.
I yum install tomcat6
I created two instance tree's, which are the Catalina_base locations for each instance.
test.foo.com
-/var/tomcat6/test
-- conf
-- logs
-- temp
-- webapps
-- work
test2.foo.com
-/var/tomcat6/test2
-- conf
-- logs
-- temp
-- webapps
-- work
I configured both to have independent AJP13 ports, shutdown, et al. That seems to be fine.
To start these instances, I've created symlinks to /etc/init.d/tomcat6 for both instances and created a file matching these names in /etc/sysconfig/<init-script-name>
I modified /etc/init.d/tomcat6 file so that it calls a startup script named the same as itself, and uses the catalina base as part of the log path. See my mods here:
http://fpaste.org/gfqa/.
The thought here is, instead of the init script always calling /usr/sbin/tomcat6, it calls /usr/sbin/<init-script-name> for startup, which will likely also be a symlink to the actual file which is /usr/sbin/tomcat6. This allows the startup to also pick up the instance specific config in /etc/sysconfig solely based on the name of the init script that is called, cascading down through startup, to the instance specific config.
FILES AND LINKS
- Init Script links
/etc/init.d/tomcat6
see my mods:
http://fpaste.org/gfqa/
/etc/init.d/tomcat6-test > tomcat6
/etc/init.d/tomcat6-test2 > tomcat6
- Startup Script links
/usr/sbin/tomcat6
see my mods:
http://fpaste.org/6KqG/
/usr/sbin/tomcat6-test > tomcat6
/usr/sbin/tomcat6-test2 > tomcat6
- Instance specific configs, these have all the specific variables most specifically, CATALINA_BASE, needed to run seperate instances and override the defaults which are set in /etc/tomcat6/tomcat6.conf
/etc/sysconfig/tomcat6-test
/etc/sysconfig/tomcat6-test2
I guess my question, is. Are these script mods necessary? It seems like the makings of having a paradigm for instantiating different instances is already there, but it was missing the few things I've added (see my links). It would be nicer to be able to just yum install tomcat6 and create a couple config files. Now I have to be careful about yum updates and overwriting my patches.
Any thoughts?
---------- Post added at 06:39 PM ---------- Previous post was at 01:32 PM ----------
In case anyones interested I found a bug here:
https://bugzilla.redhat.com/show_bug.cgi?id=575341
We use the amazon AMI and our repos are:
http://repo.us-east-1.amazonaws.com/....9/mirror.list
http://repo.us-east-1.amazonaws.com/...rc-mirror.list
http://repo.us-east-1.amazonaws.com/...fo-mirror.list
I'm working to resolve the issue. I'll post a fix once its sorted out.