Cron not running
On my WHM server, cron appears to not be running. The first warning I received was that WHMCS automation was failing. I have several clients who also have crons, and all sites appear to be affected.
If I run "tail -f /var/log/cron" it shows me recent cron activity, and it's all from around 12 hours ago.
I have tried stopping and restarting crond, and this made no difference.
When I check crond status, I get the following...
pam_systemd(crond:session): Failed to create session: Connection timed out
Jan 05 17:12:01 host.name.tld crond[2600060]: (username) INFO (Job execution of per-minute job scheduled for 17:10 delayed into subsequen>
Any debug/solutions appreciated.
Alistair.
-
Hey there! What happens if you manually restart the service on the command line with this command?
/scripts/restartsrv_crond
I would expect that to show odd output if there is something happening with the cron service on the machine.
0 -
Hi there, here is the output...
Waiting for “crond” to restart ………waiting for “crond” to initialize ………finished.
Service Status
crond (/usr/lib/systemd/system/crond.service - simple) is running with PID 2633407 (systemd check method).Startup Log
Jan 05 18:20:07 host.domain.tld systemd[1]: Started Command Scheduler.
Jan 05 18:20:07 host.domain.tld crond[2633407]: (CRON) STARTUP (1.5.7)
Jan 05 18:20:07 host.domain.tld crond[2633407]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 43% if used.)
Jan 05 18:20:07 host.domain.tld crond[2633407]: (CRON) INFO (running with inotify support)
Jan 05 18:20:07 host.domain.tld crond[2633407]: (antiliespg) ORPHAN (no passwd entry)
Jan 05 18:20:07 host.domain.tld crond[2633407]: (CRON) INFO (@reboot jobs will be run at computer's startup.)crond restarted successfully.
One other aspect to this i have just noticed. I have some cronjobs that run as root. They do work. This seams to be limited to regular user accounts.
0 -
Thanks for confirming the service loads properly. Ultimately I'm not finding much on my end about this specific issue, but checking /var/log/messages is never a bad idea for system-wide problems.
If that doesn't get you pointed in the right direction you can always create a ticket so the server can be directly investigated.
0 -
A reboot resolved the issue. (I hate doing them) But it was the last resort. I think PAM was stuck and not able to authenticate to run the cronjobs. Strangely, I got a warning when rebooting...
"[root@host ~]# reboot Failed to set wall message, ignoring: Connection timed out Call to Reboot failed: Connection timed out [root@host ~]#" It did, however, perform the reboot.
After the reboot, I was able to tail the cron logs and see entries dated today. I will continue to monitor it.
Alistair.
0 -
I'm glad to hear that things are working well now, even if it took a reboot! At least it ultimately wasn't something related to cPanel.
0
Please sign in to leave a comment.
Comments
5 comments