System specs (I realize this is an Amazon AMI, but I have a fedora instance with the same issue).
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.
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
see my mods: http://fpaste.org/gfqa/
/etc/init.d/tomcat6-test > tomcat6
/etc/init.d/tomcat6-test2 > tomcat6
- Startup Script links
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
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.
---------- Post added at 06:39 PM ---------- Previous post was at 01:32 PM ----------
In case anyones interested I found a bug here:
We use the amazon AMI and our repos are:
I'm working to resolve the issue. I'll post a fix once its sorted out.