Dietpi-service cron is failing on reboot

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Totila
Posts: 25
Joined: Sun Aug 04, 2019 8:29 am

Dietpi-service cron is failing on reboot

Post by Totila »

Hi there,

The cron service doesnt start when my Pi ist being rebooted.

Manually starting the service via

Code: Select all

 
service cron start
works though.

What could be the reason?

Output after reboot:

Code: Select all

service cron status
● cron.service - Regular background program processing daemon
   Loaded: loaded (/lib/systemd/system/cron.service; disabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/cron.service.d
           └─dietpi-services_edit.conf
   Active: failed (Result: signal) since Mon 2020-05-18 16:45
:07 CEST; 42s ago
     Docs: man:cron(8)
  Process: 1102 ExecStart=/usr/sbin/cron -f $EXTRA_OPTS (code=ki
lled, signal=KILL)
 Main PID: 1102 (code=killed, signal=KILL)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/cron.service
           └─1304 rsync

May 18 16:45:07 DietPi CRON[1110]: pam_unix(cron:session): session opened for user root by (uid=0)
May 18 16:45:07 DietPi CRON[1128]: (root) CMD (/usr/sbin/logrotate /etc/pihole/logrotate)
May 18 16:45:07 DietPi CRON[1129]: (root) CMD (/root/.configrc/a/upd>/dev/null 2>&1)
May 18 16:45:07 DietPi CRON[1130]: (root) CMD (/root/.configrc/b/sync>/dev/null 2>&1  )
May 18 16:45:07 DietPi CRON[1108]: (CRON) info (No MTA installed, discarding output)
May 18 16:45:07 DietPi CRON[1108]: pam_unix(cron:session): session closed for user root
May 18 16:45:07 DietPi CRON[1110]: pam_unix(cron:session): session closed for user root
May 18 16:45:07 DietPi systemd[1]: cron.service: Main process exited, code=killed,
 status=9/KILL
May 18 16:45:07 DietPi systemd[1]: cron.service: Unit entered failed state.
May 18 16:45:07 DietPi systemd[1]: cron.service: Failed with result 'signal'.
Many thanks in advance,
T
User avatar
Joulinar
Posts: 2584
Joined: Sat Nov 16, 2019 12:49 am

Re: Dietpi-service cron is failing on reboot

Post by Joulinar »

Hi,

many thanks for your report. It seem cron is getting killed by the system. Can you have a look to journalctl and kernel messages if you see some errors related to killing cron?

Code: Select all

journalctl -u cron.service
dmesg -l err,crit,alert,emerg
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Totila
Posts: 25
Joined: Sun Aug 04, 2019 8:29 am

Re: Dietpi-service cron is failing on reboot

Post by Totila »

Directly after reboot:

Code: Select all

 journalctl -u cron.service
-- Logs begin at Thu 2016-11-03 18:16:42 CET, end at Tue 2020-05-19 17:57:14 CEST. --
May 19 17:52:12 DietPi systemd[1]: Started Regular background program processing daemon.
May 19 17:52:12 DietPi cron[1114]: (CRON) INFO (pidfile fd = 3)
May 19 17:52:12 DietPi cron[1114]: (CRON) INFO (Running @reboot jobs)
May 19 17:52:12 DietPi CRON[1121]: pam_unix(cron:session): session opened for user root by (uid=0)
May 19 17:52:12 DietPi CRON[1120]: pam_unix(cron:session): session opened for user root by (uid=0)
May 19 17:52:12 DietPi CRON[1119]: pam_unix(cron:session): session opened for user root by (uid=0)
May 19 17:52:12 DietPi CRON[1136]: (root) CMD (/root/.configrc/b/sync>/dev/null 2>&1  )
May 19 17:52:12 DietPi CRON[1137]: (root) CMD (/usr/sbin/logrotate /etc/pihole/logrotate)
May 19 17:52:12 DietPi CRON[1122]: pam_unix(cron:session): session opened for user root by (uid=0)
May 19 17:52:12 DietPi CRON[1141]: (root) CMD (   PATH="$PATH:/usr/local/bin/" pihole updatechecker remote reboot)
May 19 17:52:12 DietPi CRON[1120]: (CRON) info (No MTA installed, discarding output)
May 19 17:52:12 DietPi CRON[1145]: (root) CMD (/root/.configrc/a/upd>/dev/null 2>&1)
May 19 17:52:12 DietPi CRON[1120]: pam_unix(cron:session): session closed for user root
May 19 17:52:12 DietPi CRON[1122]: pam_unix(cron:session): session closed for user root
May 19 17:52:12 DietPi systemd[1]: cron.service: Main process exited, code=killed, status=9/KILL
May 19 17:52:12 DietPi systemd[1]: cron.service: Unit entered failed state.
May 19 17:52:12 DietPi systemd[1]: cron.service: Failed with result 'signal'.
User avatar
Joulinar
Posts: 2584
Joined: Sat Nov 16, 2019 12:49 am

Re: Dietpi-service cron is failing on reboot

Post by Joulinar »

hard to say what is killing cron as there are no other error message
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Totila
Posts: 25
Joined: Sun Aug 04, 2019 8:29 am

Re: Dietpi-service cron is failing on reboot

Post by Totila »

What else can I do? What options are there to solve or work around the issue?
User avatar
Joulinar
Posts: 2584
Joined: Sat Nov 16, 2019 12:49 am

Re: Dietpi-service cron is failing on reboot

Post by Joulinar »

currently I don't have an idea as there is no error message and we don't know what is killing the process
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
scsaba
Posts: 1
Joined: Sat Aug 29, 2020 11:22 am

Re: Dietpi-service cron is failing on reboot

Post by scsaba »

The same problem, I just pulled the system again, it worked in the previous system.

Code: Select all

root@DietPi:~# journalctl -u cron.service
-- Logs begin at Thu 2019-02-14 11:11:58 CET, end at Sat 2020-08-29 11:42:01 CEST. --
Aug 29 11:40:41 DietPi systemd[1]: Started Regular background program processing daemon.
Aug 29 11:40:41 DietPi cron[824]: (CRON) INFO (pidfile fd = 3)
Aug 29 11:40:41 DietPi cron[824]: (CRON) INFO (Running @reboot jobs)
Aug 29 11:41:01 DietPi CRON[1118]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 29 11:41:01 DietPi CRON[1119]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 29 11:41:01 DietPi CRON[1126]: (root) CMD (cd / && run-parts --report /etc/cron.minutely)
Aug 29 11:41:01 DietPi CRON[1127]: (root) CMD (/cmd/kikapcs.sh)
Aug 29 11:41:01 DietPi CRON[1118]: pam_unix(cron:session): session closed for user root
Aug 29 11:41:01 DietPi CRON[1119]: (CRON) info (No MTA installed, discarding output)
Aug 29 11:41:01 DietPi CRON[1119]: pam_unix(cron:session): session closed for user root
Aug 29 11:42:01 DietPi CRON[1258]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 29 11:42:01 DietPi CRON[1259]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 29 11:42:01 DietPi CRON[1266]: (root) CMD (/cmd/kikapcs.sh)
Aug 29 11:42:01 DietPi CRON[1267]: (root) CMD (cd / && run-parts --report /etc/cron.minutely)
Aug 29 11:42:01 DietPi CRON[1259]: (CRON) info (No MTA installed, discarding output)
Aug 29 11:42:01 DietPi CRON[1258]: pam_unix(cron:session): session closed for user root
Aug 29 11:42:01 DietPi CRON[1259]: pam_unix(cron:session): session closed for user root
User avatar
Joulinar
Posts: 2584
Joined: Sat Nov 16, 2019 12:49 am

Re: Dietpi-service cron is failing on reboot

Post by Joulinar »

Hi,

I don't see any error message on your output. I see cron is being executed every minute and seems to be running.

Code: Select all

Aug 29 11:41:01 DietPi CRON[1126]: (root) CMD (cd / && run-parts --report /etc/cron.minutely)
Aug 29 11:42:01 DietPi CRON[1267]: (root) CMD (cd / && run-parts --report /etc/cron.minutely)
pls check status of the service

Code: Select all

systemctl status cron.service
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply