The MettleCI Service doesn't automatically start after a reboot
Problem
Your MettleCI Workbench service is installed and running normally but is not automatically started after a host reboot. The only way to get the service started is to do it manually from the shell:
$> service dm-mettleci-workbench start
If the services is not registered then the
rpm
installation has not executed properly (or at all) and you should consult the relevant installation documentation before raising a support caseIf the services is registered then the problem is not related to your MettleCI installation and you and/or your system administrator should diagnose your operating system configuration.
Diagnostics
Unix - RHEL
If you ran the MettleCI Workbench installer using rpm
then the dm-mettleci-workbench
service should have been set up to be automatically invoked during system boot when it was registered.
Use the following commands to check (or have your system administrators check) whether your host has dm-mettleci-workbench
registered as a systemd service.
For example:
# Check the service is installed
$> chkconfig --list | grep -i mettleci
dm-mettleci-workbench 0:off 1:off 2:on 3:on 4:on 5:on 6:off
$> chkconfig dm-mettleci-workbench
(followed IMMEDIATELY by)
$> echo $?
(should return zero)
# Check the service is running (failure)
$> service dm-mettleci-workbench status
/opt/dm/mci/METTLE_UI.pid dead but pidfile exists
# Check the service is running (running)
$> service dm-mettleci-workbench status
---------------------------------------
MettleCI Workbench is running
---------------------------------------
# Check if the systemd service has been generated successfully
$> systemctl status dm-mettleci-workbench
● dm-mettleci-workbench.service - SYSV: DataMigrators Workbench
Loaded: loaded (/etc/rc.d/init.d/dm-mettleci-workbench; generated)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
$> systemctl daemon-reload
$> systemctl start dm-mettleci-workbench
$> systemctl status dm-mettleci-workbench
● dm-mettleci-workbench.service - SYSV: DataMigrators Workbench
Loaded: loaded (/etc/rc.d/init.d/dm-mettleci-workbench; generated)
Active: active (exited) since Thu 2022-10-20 14:11:22 AEDT; 2s ago
Docs: man:systemd-sysv-generator(8)
Process: 12060 ExecStart=/etc/rc.d/init.d/dm-mettleci-workbench start (code=exited, status=0/SUCCESS)
Oct 20 14:11:22 engn dm-mettleci-workbench[12060]: ---------------------------------------
Oct 20 14:11:22 engn dm-mettleci-workbench[12060]: ---------------------------------------
Oct 20 14:11:22 engn dm-mettleci-workbench[12060]: MettleCI Workbench is running
Oct 20 14:11:22 engn dm-mettleci-workbench[12060]: ---------------------------------------
Oct 20 14:11:22 engn systemd[1]: dm-mettleci-workbench.service: Child 12060 belongs to dm-mettleci-workbench.service.
Oct 20 14:11:22 engn systemd[1]: dm-mettleci-workbench.service: Control process exited, code=exited status=0
Oct 20 14:11:22 engn systemd[1]: dm-mettleci-workbench.service: Got final SIGCHLD for state start.
Oct 20 14:11:22 engn systemd[1]: dm-mettleci-workbench.service: Changed start -> exited
Oct 20 14:11:22 engn systemd[1]: dm-mettleci-workbench.service: Job dm-mettleci-workbench.service/start finished, re>
Oct 20 14:11:22 engn systemd[1]: Started SYSV: DataMigrators Workbench.
# Check if the systemd service is enabled
$> systemctl is-enabled dm-mettleci-workbench
dm-mettleci-workbench.service is not a native service, redirecting to systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install is-enabled dm-mettleci-workbench
enabled
# Check the systemd service settings
$> systemctl cat dm-mettleci-workbench.service
# /run/systemd/generator.late/dm-mettleci-workbench.service
# Automatically generated by systemd-sysv-generator
[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/rc.d/init.d/dm-mettleci-workbench
Description=SYSV: DataMigrators Workbench
Before=multi-user.target
Before=multi-user.target
Before=multi-user.target
Before=graphical.target
After=ISFAgents.service
After=ODFEngine.service
[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/etc/rc.d/init.d/dm-mettleci-workbench start
ExecStop=/etc/rc.d/init.d/dm-mettleci-workbench stop
Known Issue when /opt is a Remote Mount
If the /opt
directory is a remote mount, then the mount may not be ready when the MettleCI service tries to start.
In this situation, the service will not start on boot but starts normally when executed manually.
To rectify this, login as root and execute the following commands:-
$> rm /etc/init.d/dm-mettleci-workbench
$> cp /opt/dm/mci/dm-mettleci-workbench /etc/init.d/dm-mettleci-workbench
$> systemctl daemon-reload
NOTE: The above commands must be repeated each time that MettleCI is upgraded
Run the Systemd Service Generator in Debug mode
If the output of the following commands is:-
Execute the following:-
The output should help identify any issues with generating the Systemd Service.
Windows
Use the Windows Services Manager to verify that the service is installed correctly and configured to auto-start on host reboot.
If the services is not registered then the
rpm
installation has not executed properly (or at all) and you should consult the relevant installation documentation before raising a support caseIf the services is registered then the problem is not related to your MettleCI installation and you and/or your system administrator should diagnose your operating system configuration.
© 2015-2024 Data Migrators Pty Ltd.