This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Dec 15, 2014, 5:18 PM
37 Posts
topic has been resolvedResolved

Stopping Domino in RHEL/CENTOS 7

  • Category: Domino Server
  • Platform: Linux
  • Release: 9.0.1
  • Role: Administrator
  • Tags:
  • Replies: 4
I just can't seem to figure out how to get RHEL7/CENTOS7 to not kill my Domino Server with a reboot command. I have successfully crafted a working systemd file that correctly starts the server on boot and allows me to gracefully shutdown or restart the server with systemctl:

[Unit]
Description=IBM (LOTUS!) Domino Server
Documentation=http://www-947.ibm.com/support/entry/portal/product/lotus/ibm_notes
After=network.target

[Service]
Type=simple
PIDFile=/run/domino.pid
TimeoutSec=300
ExecStart=/usr/bin/su - notes -c '/opt/ibm/domino/bin/server -jc -c'
ExecReload=/usr/bin/su - notes -c 'echo Y | /opt/ibm/domino/bin/server -jc -q' && '/opt/ibm/domino/bin/server -jc -c'
ExecStop=/usr/bin/su - notes -c 'echo Y | /opt/ibm/domino/bin/server -jc -q'
[Install]
WantedBy=multi-user.target graphical.target

However, if the server needs to be shut down, or rebooted, I need to remember to shut down the service manually with
systemctl stop domino

Otherwise, the databases need recovery when they start back up.

I have tried a couple of suggestions I have found on the web:
1. create a shutdown script that is wanted by the shutdown.target
2. copy systemd-halt.service, systemd-poweroff.service, systemd-shutdown.service, and systemd-reboot.service over to /etc/systemd/system and add a ExecStartPre= line to shut down the service

I don't know what to do next, except ask if there is something simple that I've missed as a newbie to systemd.
Dec 26, 2014, 2:45 PM
37 Posts
SOLVED
Thanks, Joe. I've been using those Daniel Nashed's scripts for years and I agree. Very good stuff. The root issue in this case was, however, that in RHEL 7, unless you are very careful, systemd will kill Domino on OS shutdown instead of shutting it down properly according to the script.

This is the case whether you install it with chkconfig or call it from one of the new-fangled service files in systemd.


Through painstaking trial and error, I've stumbled upon the correct combination of directives in the systemd service file. A systemd guru could probably improve upon this, but the basic, everyday functionality is there, and most importantly, the databases will not crash and have to go through recovery when Domino starts back up again. "domino_script" comes from the
Nashcom website you mentioned earlier, but the real magic in a RHEL 7 scenario are the directives, "KillMode=process" and "RemainAfterExit=yes":

[Unit]

Description=IBM Domino Server
Documentation=http://www-947.ibm.com/support/entry/portal/product/lotus/ibm_notes
After=syslog.target network.target

 

[Service]

Type=simple
User=notes
LimitNOFILE=60000
ExecStart=/opt/ibm/domino/bin/domino_script start
ExecStop=/opt/ibm/domino/bin/domino_script stop
TimeoutSec=300
KillMode=process
RemainAfterExit=yes

 

[Install]

WantedBy=multi-user.target

Apr 10, 2018, 2:29 PM
5 Posts
Better service file

For some reason, I can't edit or comment on your article...

With systemd, you don't need ANY startup script.
The use of these scripts were actually the CAUSE of your shutdown issues.
Instead of forcing the use of old initd scripts into systemd, just let systemd start Domino server, and do nothing else.
See also https://jdebp.eu/FGA/systemd-house-of-horror/...

Here's what my own domino.service file looks like:


[Unit]
Description="IBM Domino Server"
Documentation=https://www.ibm.com/support/home/product/L153441H04576Y68/IBM_Domino
After=network.target

[Service]
User=notes
WorkingDirectory=/var/notes
LimitNOFILE=60000
ExecStart=/bin/sh /opt/ibm/lotus/bin/server -jc -c
ExecStop=/bin/sh /opt/ibm/lotus/bin/server -jc -q -y

[Install]
WantedBy=multi-user.target



Plain and simple.

Pros:
- no exotic systemd feature involved (KillMode/RemainAfterExit)
- no dependancy on any 3rd party startup script
- systemd gains full visibility over Domino tasks (see "systemctl status domino")

NB : If you don't want to use the Java console, you can probably use (untested):
ExecStart=/bin/sh /opt/ibm/lotus/bin/server
ExecStop=/bin/sh /opt/ibm/lotus/bin/server -q


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal