1

We have a number of machines using yum-cron and an internal mirror server to keep up-to-date. Some of them will send an email letting us know the updates will be (have been) applied but don't receive anything from others.

There are two potential issues:

  • Some machines failed to update in the past because yum-cron's /etc/cron.daily/0yum-daily.cron conflicts/competes with anacron (run-parts? --> logrotate?)
  • Machines are updated but no notification is sent even though /etc/yum/yum-cron.conf emit_via email, has correct email addresses and I can nc to port 25 of the email server

Here is an excerpt from /var/log/cron on a machine that is currently updating but hasn't notified:

Feb 18 03:29:01 hostname anacron[115262]: Job `cron.daily' started
Feb 18 03:29:01 hostname run-parts(/etc/cron.daily)[115278]: starting 0yum-daily.cron
Feb 18 04:01:01 hostname CROND[115298]: (root) CMD (run-parts /etc/cron.hourly)
Feb 18 04:01:01 hostname run-parts(/etc/cron.hourly)[115298]: starting 0anacron
Feb 18 04:01:01 hostname anacron[115307]: Anacron started on 2019-02-18
Feb 18 04:01:01 hostname anacron[115307]: Job `cron.daily' locked by another anacron - skipping
Feb 18 04:01:01 hostname anacron[115307]: Normal exit (0 jobs run)
Feb 18 04:01:01 hostname run-parts(/etc/cron.hourly)[115309]: finished 0anacron

ps aux | grep cron

root      84056  0.0  0.0 126288   976 ?        Ss   Feb02   0:02 /usr/sbin/crond -n
root     127274  0.0  0.0 113176  1500 ?        Ss   13:01   0:00 /bin/bash /bin/run-parts /etc/cron.hourly
root     127286  0.0  0.5 351412 21748 ?        S    13:01   0:00 /usr/bin/python -tt /usr/sbin/yum-cron /etc/yum/yum-cron-hourly.conf
root     127287  0.0  0.0 113540   976 ?        S    13:01   0:00 awk -v progname=/etc/cron.hourly/0yum-hourly.cron progname { ????   print progname ":\n" ????   progname=""; ???       } ???       { print; }
root     127597  0.0  0.0 112712   976 pts/0    S+   13:07   0:00 grep --color=auto cron

Some minutes later:

root      84056  0.0  0.0 126288   976 ?        Ss   Feb02   0:03 /usr/sbin/crond -n
root     129427  0.0  0.0 112712   980 pts/0    S+   13:45   0:00 grep --color=auto cron

Updates are being applied even though I know this was not necessarily happening in the past and why I am asking about the cron logs.

rpm -qa --last | head -5

systemd-sysv-219-62.el7_6.5.x86_64            Thu 21 Feb 2019 07:15:42 AM EST
systemd-219-62.el7_6.5.x86_64                 Thu 21 Feb 2019 07:15:40 AM EST
systemd-libs-219-62.el7_6.5.x86_64            Thu 21 Feb 2019 07:15:39 AM EST
kernel-3.10.0-957.5.1.el7.x86_64              Sat 02 Feb 2019 08:08:02 AM EST
efivar-libs-36-11.el7_6.1.x86_64              Sat 02 Feb 2019 08:07:59 AM EST

Nothing stood out to me in /var/log/maillog

1
  • It was later found that the Microsoft SMTP relay is using a whitelist of acceptable hosts/IPs even though this was thought not to be the case previously. After corrections to the whitelist to allow for the other non-communicating hosts, email was tested with mailx and found to work. I consider this a partial answer. We found the issue with some hosts not sending email but what conflicts with cron/anacron is unknown. It's been a couple of months since we corrected this but iirc, netcat revealed at least a hint of this when using increased verbosity.
    – Johnny Doe
    Feb 6, 2020 at 15:34

0

Your Answer

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

Browse other questions tagged or ask your own question.