TheDMSGroup / mautic-eb

Mautic + Elastic Beanstalk = Scalable marketing automation
https://www.mautic.org
GNU General Public License v3.0
104 stars 27 forks source link

Cronjobs stopped working #86

Closed zero-one-devteam closed 5 years ago

zero-one-devteam commented 5 years ago
Q A
Question

Description:

My autoscaling currently has only one instance running. Unfortunatly the cronjobs stopped working. Although there are entries in the cron log, no results are created (e.g. no campaigns are sent, no segments built etc.). What can I do for further debbugging? What could be the reasons? I am not shure when exactly they stopped because I am still in a test run - maybe it was after rebuilding the environment.

If a bug:

Q A
Mautic version 2.15.0
PHP version 7.2

Log errors:

Mar 25 16:32:01 ip-172-31- CROND[32675]: (root) CMD (cron mautic:ledger:report:reprocess >/dev/null 2>&1) Mar 25 16:33:01 ip-172-31- CROND[1384]: (root) CMD (if [ ! -d /tmp/imports ]; then sudo ln -sf /efs/mautic/imports /tmp ; fi ; console mautic:import --limit=1200 --quiet >/dev/null 2>&1) Mar 25 16:33:01 ip-172-31- CROND[1386]: (root) CMD (cron mautic:broadcasts:send --quiet >/dev/null 2>&1) Mar 25 16:33:01 ip-172-31- CROND[1385]: (root) CMD (console mautic:emails:send --quiet >/dev/null 2>&1) Mar 25 16:33:01 ip-172-31- CROND[1387]: (root) CMD (/usr/sbin/awslogs-nanny > /dev/null 2>&1) Mar 25 16:34:01 ip-172-31- CROND[2626]: (root) CMD (cron mautic:social:monitoring >/dev/null 2>&1) Mar 25 16:34:01 ip-172-31- CROND[2627]: (root) CMD (console mautic:emails:send --quiet >/dev/null 2>&1) Mar 25 16:34:01 ip-172-31- CROND[2629]: (root) CMD (if [ ! -d /tmp/imports ]; then sudo ln -sf /efs/mautic/imports /tmp ; fi ; console mautic:import --limit=1200 --quiet >/dev/null 2>&1) Mar 25 16:34:01 ip-172-31- CROND[2628]: (root) CMD (cron mautic:ledger:report:reprocess >/dev/null 2>&1) Mar 25 16:34:01 ip-172-31- CROND[2630]: (root) CMD (/usr/sbin/awslogs-nanny > /dev/null 2>&1)

heathdutton commented 5 years ago

Every 5 minutes the cron script checks to see if the instance running cron tasks is the current leading instance, even accounting for scaling. You must make sure that all your EC2s have that permission to check their status. This is in the Readme. You can test this by logging in via SSH and typing cron what is the result?

zero-one-devteam commented 5 years ago

Thanks for your fast answer! The missing right was excatly the problem. It must have been deleted accidently. Thanks a lot!