Page 1 of 1
Daily cron errors: getpwnam() failed
Posted: 21 May 2019 12:46
by warlord
Hi,
I recently installed 4.x on a CentOS 7.6 system using the build.bash script. On the first run I got a set of errors from missing files (unfortunately I deleted these). However, the daily logwatch is showing persistent cron script errors:
--------------------- Cron Begin ------------------------
**Unmatched Entries**
ERROR (getpwnam() failed)
ERROR (getpwnam() failed)
---------------------- Cron End -------------------------
I have not yet tried to debug this.
Re: Daily cron errors: getpwnam() failed
Posted: 30 May 2019 10:19
by jamerson
i am not sure if it will works with centos 7.6,
i=ve been developing it with the guys on centos 7.0 and do have 4 on productions.
so i beleive your issue is your centos version.
Re: Daily cron errors: getpwnam() failed
Posted: 31 May 2019 19:38
by warlord
Hi.
CentOS 7.0 is from June 2014, which means it is 5 years old. You can't even install EL7.0 today if you wanted to -- none of the repos contain it anymore. Even 7.6 is relatively old (October 2018, so 8 months old).
I hope that you're not saying that you intend to only support a 5-year-old centos release in the upcoming 4.0?
Re: Daily cron errors: getpwnam() failed
Posted: 31 May 2019 19:58
by warlord
A little more debugging for you:
Code: Select all
# grep -i getpwnam /var/log/cron
...
May 29 12:00:01 efa crond[3068]: (python) ERROR (getpwnam() failed)
May 30 00:00:01 efa crond[3068]: (python) ERROR (getpwnam() failed)
May 30 12:00:01 efa crond[3068]: (python) ERROR (getpwnam() failed)
May 31 00:00:01 efa crond[3068]: (python) ERROR (getpwnam() failed)
May 31 12:00:01 efa crond[3068]: (python) ERROR (getpwnam() failed)
# ps aux | grep -i cron
root 3068 0.0 0.0 126316 1728 ? Ss May17 0:21 /usr/sbin/crond -n
root 30663 0.0 0.0 182392 2560 ? S 15:00 0:00 /usr/sbin/CROND -n
#
/usr/sbin/crond is from cronie-1.4.11-20
/usr/sbin/CROND does not exist
A little more digging (and googling) took me to
https://stackoverflow.com/questions/418 ... -from-cron which then pointed me to /etc/cron.d/certbotrenew which is broken. Looking at that file, is contains:
Code: Select all
0 0,12 * * * python -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew >/dev/null 2>&1
Specifically, it is missing a 'user' before the 'python'. So that is the solution to TWO bugs here:
1) it's the solution to this one, and
2) it's the solution to why certbot isn't being run, because the cron.d entry is broken.