2

I have an Ubuntu 14.04 and I am trying to start cron service without success. I always get this after running service cron start:

Job for cron.service failed because the control process exited with error code.

systemctl status cron.service says that the cron service is loaded but failed:

cron.service
   Loaded: loaded (/etc/init.d/cron; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-06-15 09:06:19 AWST; 6min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 22707 ExecStart=/etc/init.d/cron start (code=exited, status=1/FAILURE)

 cron[22707]: Rather than invoking init scripts through /etc/init.d, use the service(8)
 cron[22707]: utility, e.g. service cron start
 cron[22707]: initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
 cron[22707]: Since the script you are attempting to invoke has been converted to an
 cron[22707]: Upstart job, you may also use the start(8) utility, e.g. start cron
 cron[22707]: start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
 systemd[1]: cron.service: Control process exited, code=exited status=1
 systemd[1]: Failed to start cron.service.
 systemd[1]: cron.service: Unit entered failed state.
 systemd[1]: cron.service: Failed with result 'exit-code'.

Any hint on how to make cron service to successfully start?

  • 1
    14.04 shipped with Upstart instead of systemd, so those systemd messages seem curious. – user535733 Jun 15 '18 at 3:08
-1

I encountered similar issue, and this is what I was seeing

 systemctl status crond.service
● crond.service - Command Scheduler
   Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2019-02-07 13:34:38 EST; 2min 37s ago
  Process: 31470 ExecStart=/usr/sbin/crond -n $CRONDARGS (code=exited, status=1/FAILURE)
 Main PID: 31470 (code=exited, status=1/FAILURE)

What I did to resolve this by checking my cron log. I am running in rhel, and my log is at /var/log/cron, my issue was due to this ...(CRON) DEATH (can't lock /var/run/crond.pid, other pid may be 31364): Resource temporarily unavailable

so I just did

pkill -f crond

then

systemctl start crond.service 

then it's back to normal

systemctl status crond.service
● crond.service - Command Scheduler
   Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-02-07 13:37:19 EST; 1s ago
 Main PID: 31490 (crond)
   CGroup: /system.slice/crond.service
           └─31490 /usr/sbin/crond -n
  • 1
    This doesn't seem to deal with the underlying issue. Just killing things is not a solution. – Ken Sharp Feb 7 '19 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.