Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cron errors

Status
Not open for further replies.

DumTech

Technical User
Mar 23, 2001
153
US
Something is apparently amiss with my cron setup, but my inexperienced eyes can't tell what that is. Everyday, email like the following is waiting.



Subject: Cron <root@linux> run-parts /etc/cron.daily



/etc/cron.daily/slocate.cron:



fatal error: updatedb: create_db(): rename: No such file or directory

/etc/cron.daily/sysstat:



find: /var/log/sa/sar30: No such file or directory



and



Subject: Cron <root@linux> run-parts /etc/cron.daily



/etc/cron.daily/makewhatis.cron:



rm: cannot remove `/var/tmp/tmpwhatis3J93vF': No such file or directory



Well, some others too.



What's happening to cause these errors in the cron jobs? How would one revert to the config files that were installed by default (RH7.1)?
 
Hi,

The actual redhat default crontab config is provided in the crontabs rpm --> ftp://rpmfind.net/linux/redhat/7.1/en/os/i386/RedHat/RPMS/crontabs-1.9-2.noarch.rpm .

All that contains is the 'root' config files and the 'run-parts' script :

/etc/cron.daily
/etc/cron.hourly
/etc/cron.monthly
/etc/cron.weekly
/etc/crontab
/usr/bin/run-parts

(Crond itself is in the vixie-cron rpm - ftp://rpmfind.net/linux/redhat/7.1/en/os/i386/RedHat/RPMS/vixie-cron-3.0.1-62.i386.rpm )

However, entries referred to in the subdirectories like /etc/cron.daily are provided by the related packages themselves. For example:

/etc/cron.daily/slocate.cron

comes from the slocate rpm --> ftp://rpmfind.net/linux/redhat/7.1/en/os/i386/RedHat/RPMS/slocate-2.5-5.i386.rpm .

So, you may end up re-installing a few rpms if there are stray cron files lying around without all the underlying stuff that they call. To re-install an existing rpm you just append '--replacepkgs' . For example :

rpm -Uvh --replacepkgs slocate-*.rpm

If you need to find out which rpm installed a file do something like :

rpm -q --whatprovides /etc/cron.daily/slocate.cron

What do they do ? - slocate runs a job to update the 'locate' database with filepaths so that you can do commands like 'locate http.conf' and get an 'instant' response; sysstat runs daily/hourly system monitoring statistics; makewhatis runs a job related to 'man' pages similar to slocate, i.e. it creates/updates a words database;

Hope this helps




 
Thanks ifincham, that looks like it should indeed help. I'll check it out tonight. :)

I still don't understand where these errors started coming from though... Unfortunately, I'm not sure exactly when they started or what I might've done to my system immediately prior to that, but it doesn't make sense to me to get a message like this:

rm: cannot remove `/var/tmp/tmpwhatis3J93vF': No such file or directory

Looks like that's a temp file makewhatis created, so where is that file disappearing to before the program can delete its own temp file?

Do you think replacing the default config files and/or package.cron files will take care of it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top