<---- template headericclude ----->
Multiple Instances of Tomcat6 sharing /bin folder
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 1 of 1
  1. #1
    Join Date
    Jan 2011
    Location
    Philadelphia
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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 09:27 PM.

Similar Threads

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]