Fedora Linux Support Community & Resources Center
  #1  
Old 10th January 2011, 11:39 PM
hunt3r Offline
Registered User
 
Join Date: Jan 2011
Location: Philadelphia
Posts: 3
macoschrome
Multiple Instances of Tomcat6 sharing /bin folder

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.

Last edited by hunt3r; 10th January 2011 at 08:27 PM.
Reply With Quote
Reply

Tags
amazon, centos, fedora, tomcat 6.0.29, tomcat6

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Instances of Kile daviddoria Using Fedora 2 5th October 2010 03:51 PM
multiple instances of pulesaudio g8jvm Servers & Networking 6 20th September 2010 07:16 PM
Multiple instances of yum studyhard Using Fedora 2 25th June 2010 05:14 AM
Multiple MYSQL instances kchiu Using Fedora 1 25th April 2007 03:35 PM
Multiple Instances of artsd in fc3 ericxx2004 Using Fedora 1 18th November 2004 12:32 AM


Current GMT-time: 14:28 (Thursday, 30-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Swidnica Photos on Instagram - Iran Travel Photos - Bidar