Page 1 of 1

Crash Recovery

Posted: Tue Aug 10, 2021 6:43 pm
by markzvo
I can't get any crash recovery working. I want QLC+ to restart on the Pi when it crashes or when exited by a user.

I have tried adding:
[Service]
Restart=always
RestartSec=10s

to the file "/etc/systemd/system/qlcplus.service.d/override.conf" and this does not work. Nothing happens.


I have also installed monit
I have configured the service correctly and in the file "/etc/monit/conf.d/qlcplus" I have set:
check process qlcplus with pidfile /var/run/qlcplus.pid
start program = "/etc/init.d/qlcplus start"
stop program = "/etc/init.d/qlcplus stop"

and this does not work either. Although the Pi sees qlcplus as stopped and attempts to restart it, I receive the following error in "/var/log/monit.log":
error : 'qlcplus' failed to start (exit status 0) -- '/etc/init.d/qlcplus start': Warning: The unit file, source configuration file or drop-ins of qlcplus.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Unfortunately, Running 'systemctl daemon-reload' does not work and definitely does not work after a reboot as the message returns.


Any suggestions on how to automatically restart qlcplus after a crash?

Re: Crash Recovery

Posted: Tue Aug 10, 2021 9:40 pm
by lighthacker2020
I assume you followed the instructions in the error message? Systemd has this odd quirk in that any changes to the unit files require that daemon-reload command to get executed (or reboot the system) to make systemd aware of the updated configuration.

Re: Crash Recovery

Posted: Tue Aug 10, 2021 11:29 pm
by markzvo
Yes, as stated:
Unfortunately, Running 'systemctl daemon-reload' does not work and definitely does not work after a reboot as the message returns.

Re: Crash Recovery

Posted: Fri Aug 13, 2021 5:52 pm
by markzvo
I have decided to just reboot the Pi if QLC+ crashes as that command (below) appears to be working.
start program = "/sbin/shutdown -r now"

Re: Crash Recovery

Posted: Mon Aug 16, 2021 7:18 pm
by GGGss
markzvo wrote: Fri Aug 13, 2021 5:52 pm I have decided to just reboot the Pi if QLC+ crashes as that command (below) appears to be working.
start program = "/sbin/shutdown -r now"
Open question: don't you need sudo rights to reboot? Or do you start (boot) QLC+ as admin?

Re: Crash Recovery

Posted: Tue Aug 17, 2021 6:53 pm
by markzvo
I do not run QLC+ as admin - it runs as set in the image.

This script just works... no sudo needed.