Can't seem to get daily cron to work (ongoing)

I’m running Eramba on RHEL/CentOS 7 and my daily cronjob appears to fail. Eramba alerts me whenever I log into the console. The hourly cron runs just fine. I’ve verified my cron job key is correct and repeatedly copied and pasted it. I even check for a bad carriage return. If I literally copy the crontab command and run it in the shell it properly executes and the Eramba health page will report the daily cron as “OK”. I’ve tried checking the crontab log but I don’t see any indication of what could be going wrong. Has anyone else encountered this problem?

Crontab
@hourly root /usr/bin/wget --no-check-certificate -O /dev/null https://eramba.domain.com/cron/hourly/myKey
@daily root /usr/bin/wget --no-check-certificate -O /dev/null https://eramba.domain.com/cron/daily/myKey

Could this have anything to do with the timezones on the server vs the timezone configured on Eramba?

Hi Dom,

timezones should have nothing to do with this, my recomendation is you run the cron on the browser directly and send to support@eramba.org a screenshot. Please also include if you can the error log (System / Settings / Error Log) - you need debug enabled to see that option.

With that information we can help you out

Thanks and happy new year!

I think the issue is related to the timezone set in Eramba. I modified my system time to match and the error has stopped. I’ll test it in a few hours by settings the timezone to “New Zealand Daylight Time” which is 12 hours ahead. If I’m right, I’ll start receiving the daily cron error because Eramba will think it’s Jan 12, when the system date will still be Jan 11th and won’t execute the daily cron job for another ~12 hours.

Confirmed. The image below shows that my daily cron is “not ok” when I set my timezone to Antarctica/McMurdo. If I change it back to US Eastern time it is “OK”.

I’m not sure if this should be considered a bug or a documentation error.

If it’s a bug, Eramba should look at the system time to determine if the daily cron was properly ran, but I’m guessing this will create date issues in the data. Not 100% sure what the daily cron does. I assume it creates alerts.

If it’s a documentation error, you can inform users they need to run the daily cron at a set hour the correlates to the timezone set in Eramba instead of @daily.

And what is your system timezone? i mean the linux system where eramba runs?

The linux (system) timezone had been set to UTC. I changed it to properly reflect it’s actually timezone, EST. Eramba is set to CST which reflects the timezone of our HQ.

Sorry I’m so late to the party, but I have a thought about why your cron could be failing and how to resolve the issue.

If you have enabled PAM, you will need to make sure cron is able to execute (allow.conf). You’ve been warned that selinux isn’t a good thing for Eramba, but if you’re using it, you’ll need to make sure that isn’t interfering.

Troubleshooting - set the cron to run every minute. Watch logs. My bet is you’ll see an entry in the security log that is prefixed with PAM.

Good luck.

RJF

Please don’t forget to reset your cron to run at the appropriate time after you’re done!

I’ve already confirmed it’s an issue with the timezone setting in Eramba. You can test this by choosing a timezone that is a day ahead.

You can test this for yourself by setting your timezone in Eramba to Antarctica/McMurdo. Depending on what timezone you are in, and what time you make the change, McMurdo should be a day ahead and it was cause a NOT OK flag under System Heath.

Glad you got it worked out. I had a problem with cron a month or so ago and it ended up being PAM so I thought I’d try to help.

Best,

RJF