Watchdog odroid C2 fails to start

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
zorro
Posts: 7
Joined: Mon Apr 19, 2021 11:38 am

Watchdog odroid C2 fails to start

Post by zorro »

watchdog complains with the comment:
cannot open /var/run/rsyslogd.pid (errno = 2 = 'No such file or directory)
and causes a reboot.
When I create this file manually (touch /var/run/rsyslogd.pid) immediately after booting it works perfect. But this file will get lost with the next reboot :-(. I expected watchdog to run as root via systemd and root should be able to create this file by itself. Isn't it?

Code: Select all

ls -la /var
insgesamt 328752
...
lrwxrwxrwx  1 root root          4 Jun 20  2017 run -> /run
...
Any hint helping to solve this problem is very much appreciated.

Thank you

Code: Select all

systemctl status watchdog.service 
● watchdog.service - watchdog daemon
   Loaded: loaded (/lib/systemd/system/watchdog.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2021-05-27 12:23:38 CEST; 19s ago
  Process: 511 ExecStartPre=/bin/sh -c [ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module (code=exited, status=0/SUCCESS)
  Process: 514 ExecStart=/bin/sh -c [ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options (code=exited, status=0/SUCCESS)
 Main PID: 516 (watchdog)
   Memory: 448.0K
   CGroup: /system.slice/watchdog.service
           └─516 /usr/sbin/watchdog -s -v -c /etc/watchdog.conf

Mai 27 12:23:45 charon watchdog[516]: still alive after 5 interval(s)
Mai 27 12:23:47 charon watchdog[516]: cannot open /var/run/rsyslogd.pid (errno = 2 = 'No such file or directory')
Mai 27 12:23:47 charon watchdog[516]: Retry at 9 seconds for /var/run/rsyslogd.pid
Mai 27 12:23:48 charon watchdog[516]: still alive after 6 interval(s)
Mai 27 12:23:50 charon watchdog[516]: cannot open /var/run/rsyslogd.pid (errno = 2 = 'No such file or directory')
Mai 27 12:23:50 charon watchdog[516]: Retry at 12 seconds for /var/run/rsyslogd.pid
Mai 27 12:23:51 charon watchdog[516]: still alive after 7 interval(s)
Mai 27 12:23:55 charon watchdog[516]: cannot open /var/run/rsyslogd.pid (errno = 2 = 'No such file or directory')
Mai 27 12:23:55 charon watchdog[516]: Retry at 17 seconds for /var/run/rsyslogd.pid
Mai 27 12:23:56 charon watchdog[516]: still alive after 8 interval(s)

I did a fresh install of the latest dietpi on odroid c2 and also did an update and an upgrade, too.
The board should be used as an headless system and therefore I installed and activated the watchdog
with the module gxbb_wd.

Code: Select all

cat /etc/default/watchdog
# Start watchdog at boot time? 0 or 1
run_watchdog=1
# Start wd_keepalive after stopping watchdog? 0 or 1
run_wd_keepalive=1
# Load module before starting watchdog
watchdog_module=gxbb_wdt
# Specify additional watchdog options here (see manpage).
watchdog_options="-s -v -c /etc/watchdog.conf"

Code: Select all

cat /etc/watchdog.conf
# Defaults compiled into the binary
#admin                  = root
interval                = 1
logtick                 = 1
log-dir                 = /var/log/watchdog

# This greatly decreases the chance that watchdog won't be scheduled before
# your machine is really loaded
realtime                = yes
priority                = 1

# Check if rsyslogd is still running by enabling the following line
pidfile                 = /var/run/rsyslogd.pid

watchdog-timeout        = 15
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: Watchdog odroid C2 fails to start

Post by Joulinar »

Hi,

watchdog is looking for the rsyslog process. As rsyslog is not installed by default, this check fails. You would need to deactivate this check in /etc/watchdog.conf

Code: Select all

# Check if rsyslogd is still running by enabling the following line
#pidfile                 = /var/run/rsyslogd.pid
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
zorro
Posts: 7
Joined: Mon Apr 19, 2021 11:38 am

Re: Watchdog odroid C2 fails to start

Post by zorro »

Hi Joulinar
I'll give it a try. Thank you very much.
Kind regards
Post Reply