Results 1 to 5 of 5

Thread: Tomcat: How to change from systemd to classic process control

  1. #1

    Default Tomcat: How to change from systemd to classic process control

    If I install tomcat under leap 15.1 it will be automatically controlled by systemd.

    This is fine except you are in need of a PID file.

    I am going to run tomcat as a resource under the cluster manager pacemaker.

    The tomcat OCF interface of pacemaker deals with the PID file and is not working well with tomcat if it is missed. With
    the classic process control with the catalina.sh it never was a problem because this scripts contains all the code
    for PID file creation/deletion etc.

    My question is what i have to do to switch from systemd control back to the classic control unter opensuse ?

    Thanks

  2. #2
    Join Date
    Sep 2012
    Posts
    5,184

    Default Re: Tomcat: How to change from systemd to classic process control

    Resource under control of OCF script should never be under control of system service manager (be it systemd or sysvinit or upstart), so I do not really understand your question. If you are asking how to disable automatic startup of unit on boot - this is "systemctl disable unit-name".

  3. #3

    Default Re: Tomcat: How to change from systemd to classic process control

    Quote Originally Posted by arvidjaar View Post
    Resource under control of OCF script should never be under control of system service manager (be it systemd or sysvinit or upstart), so I do not really understand your question. If you are asking how to disable automatic startup of unit on boot - this is "systemctl disable unit-name".
    The tomcat OCF file coming with pacemaker uses the tomcat/bin/catalina.sh script for start/stop. The tomcat installation
    under Leap 15.1 overwrites the normal catalina.sh script with another version of it using systemd. This is the reason
    why there is no longer any PID file.

    I just installed tomcat with
    #zypper in tomcat

    This automatically prepares the systemd integration.

    Is there probably another way to install tomcat to gain an 'old style' installation without doing everything manually ?

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,366
    Blog Entries
    2

    Default Re: Tomcat: How to change from systemd to classic process control

    IIRC you can specify a PID in the Unit file (If you can't find it, post and I or someone else should be able to find it unless I'm wrong). Of course, specifying a PID during startup avoids having to discover its PID after it's running (which is usually random and changes each time the process is started).

    But,
    Although I'm not in front of a Tomcat, whether any SysVinit commands used to manage Tomcat will depend on degree and progress of integration... If no major effort has been implemented yet, you'll find the commands intact and systemd commands are dynamically created to support the SysVinit service. On the other hand, if integration is well along, you may find that legacy commands are no longer supported and you'll need to modify your setup accordingly.

    Have you looked at the SUSE and LEAP documentation for HA? It's something in transition, so it'd be important to consult documentation for whatever is likely supported and implemented.

    TS
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5
    Join Date
    Sep 2012
    Posts
    5,184

    Default Re: Tomcat: How to change from systemd to classic process control

    Quote Originally Posted by f4com View Post
    The tomcat OCF interface of pacemaker deals with the PID file
    tomcat OCF resource-agent also supports redirecting to systemd:
    Code:
    <parameter name="force_systemd" unique="0" required="0"><longdesc lang="en">
    Force use of systemd when available.
    </longdesc>
    <shortdesc lang="en">Force use of systemd when available</shortdesc>
    <content type="string" default="$OCF_RESKEY_force_systemd_default" />
    </parameter>
    If this does not work for you, or you have valid use case where direct tomcat management works but systemd-based does not, you should open bug report.

Posting Permissions

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