Results 1 to 3 of 3

Thread: SLES11 what's the SUSE way to conf multiple Tomcat instances

Hybrid View

  1. #1

    SLES11 what's the SUSE way to conf multiple Tomcat instances

    What would be the SUSE way to configure multiple Tomcat instances (different CATALINA_BASE)?

    I'd like to use the rpm included in the distribution, so it gets updated by SUSE.

    I have opened a SR with support for this, while they're taking their time, I'm doing whatever I can to advance this matter.

    Thanks

  2. Re: SLES11 what's the SUSE way to conf multiple Tomcat insta

    Hi silviumc,
    Quote Originally Posted by silviumc View Post
    What would be the SUSE way to configure multiple Tomcat instances (different CATALINA_BASE)?

    I'd like to use the rpm included in the distribution, so it gets updated by SUSE.

    I have opened a SR with support for this, while they're taking their time, I'm doing whatever I can to advance this matter.

    Thanks
    looking at /etc/init.d/tomcat6, it looks as if you're expected to create i.e. symlinks to that script under the name of the different Tomcat instances:

    Code:
    NAME="$(basename $0)"
    unset ISBOOT
    if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then
        NAME="${NAME:3}"
        ISBOOT="1"
    fi
    
    # remove SUSE's rc name
    if [ "${NAME:0:2}" = "rc" ]; then
        NAME="${NAME:2}"
    fi
    
    # For SELinux we need to use 'runuser' not 'su'
    if [ -x "/sbin/runuser" ]; then
        SU="/sbin/runuser"
    else
        SU="/bin/su"
    fi
    
    # Get the tomcat config (use this for environment specific settings)
    TOMCAT_CFG="/etc/tomcat6/tomcat6.conf"
    if [ -r "$TOMCAT_CFG" ]; then
        . $TOMCAT_CFG
    fi
    
    # Get instance specific config file
    if [ -r "/etc/sysconfig/${NAME}" ]; then
        . /etc/sysconfig/${NAME}
    fi
    The according configuration then goes into /etc/sysconfig/yourname (best start off with a *copy* of /etc/sysconfig/tomcat6).

    > I have opened a SR with support for this, while they're taking their time, I'm doing whatever I can to advance this matter.

    If you feel that you have been kept waiting for an excessive amount of time, there's the "talk to a SUSE Technical Services Manager" forum to report: https://forums.suse.com/forumdisplay...rvices-Manager

    Regards,
    Jens
    From the times when today's "old school" was "new school"

    If you find this post helpful and are logged into the web interface, show your appreciation and click on the star below...

  3. #3

    Re: SLES11 what's the SUSE way to conf multiple Tomcat insta

    In the meantime I started looking at /etc/init.d/tomcat6 and figured out that you need to make a copy of it with a different name, like /etc/init.d/tomcat6_instance2, edit "Provides" and so on.

    Also copy /etc/sysconfig/tomcat6 to /etc/sysconfig/tomcat6_instance2.

    This is the way it's supposed to work.

    But actually, it's a disastruous train wreck.

    The initscript is supposed to create directories for a second instance and copy necessary files. They way it does that, whenever SUSE issues an update for the .rpm, the second instance does not get updated! Distro updates are the sole reason I wanted to use the SUSE rpm.

    Not giving up, I erased all that ******** and went to manually creating symlinks the proper way, so that all the instances are using the same binary but have different configuration files.

    It's working beautifully now.

    The SUSE idea from /etc/init.d/tomcat6 was good, but the execution was awful. No documentation anywhere, config files missing essential parameters (you must specify TOMCAT_CFG in /etc/sysconfg/tomcat6_instance2, otherwise dtomcat6 tries to start the first instance all the time), no love for old Tomcat6.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •