| Back | Main view

Running IMiS/ARChive v7 on platforms with systemd init systems and ephemeral /var/run directory

Product:IMiS/ARChive
Release:7.x
Date:01/18/2018

Case: IMiS/ARChive gen 7 was release prior to wide systemd adoptation so it's startup scripts are not compatible with new platforms out-of-the-box.
This article describes the steps needed to run it in systemd environments with temporary /var/run directory which is removed after each reboot.

Description:

1. Install the product installation package (rpm) with rpm or other "helper" tools such as yum, zypper, yast, etc. per installation instructions

2. Copy attached iarcd.service file to systemd services directory usually mounted on /etc/systemd/system (this file is actually taken from gen 9 rpm which is systemd compatible).
iarcd.service

3. Since /var/run directory became ephemeral by design in kernel 3.x and onwards, process lock file (pid) cannot be stored in /var/run/iarcd/... since directory /var/run/iarcd disappears every time you boot the system.

a) create /iarc/run folder and give IMiS/ARChive process owner read/write access

sudo mkdir /iarc/run && sudo chown iarc:iarc /iarc/run && sudo chmod 755 /iarc/run

b) Modify the IMiS/ARChive configuration file (/etc/iarc.conf) and add the following line in section [Server]:

PidPath=/iarc/run/

(the information above can be adapted per your specifications if you're running the process under different user or you would like to have the pid file under different directory)

4. Enable automatic service start by executing the following command

sudo systemctl enable iarcd

5. Start the process by executing the following command

sudo systemctl start iarcd

6. In case you encounter the following problem while launching the product, patch the /etc/init.d/iarcd startup script:

Problem:
[user@iarc1 ~]# sudo systemctl start iarcd
Job for iarcd.service failed because the control process exited with error code. See "systemctl status iarcd.service" and "journalctl -xe" for details.

[user@iarcd ~]# sudo journalctl -xe
Jan 3 11:12:49 iarc1.imis.si systemd[1]: Starting IMiS/ARChive Storage Server...
-- Subject: Unit iarcd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit iarcd.service has begun starting up.
Jan 3 11:12:49 iarc1.imis.si systemd[3339]: Failed at step EXEC spawning /etc/init.d/iarcd: Exec format error
-- Subject: Process /etc/init.d/iarcd could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The process /etc/init.d/iarcd could not be executed and failed.
--
-- The error number returned by this process is 8.
Jan 3 11:12:49 iarc1.imis.si systemd[1]: iarcd.service: control process exited, code=exited status=203
Jan 3 11:12:49 iarc1.imis.si systemd[1]: Failed to start IMiS/ARChive Storage Server.
-- Subject: Unit iarcd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit iarcd.service has failed.
--
-- The result is failed.
Jan 3 11:12:49 iarc1.imis.si systemd[1]: Unit iarcd.service entered failed state.
Jan 3 11:12:49 iarc1.imis.si systemd[1]: iarcd.service failed.


Solution:
Remove the leading # character from /etc/init.d/iarcd script:

From:
#
#!/bin/sh
#
# Description: Startup script for IMiS/ARChive HSM Storage Server daemon
<snip>

To:
#!/bin/sh
#
# Description: Startup script for IMiS/ARChive HSM Storage Server daemon
<snip>


Related Documents:



| Back | Main view