Logrotate Cron Problem

Posted on September 4, 2006

advertisement

The [tag]cron[/tag] daemon keeps emailing me about the cron problem.

This is the error message:

/etc/cron.daily/logrotate:
error: bad line 45 in state file /var/lib/logrotate.status

in /var/spool/mail/root

Edit /var/lib/logrotate.status and found there is missing in line 45

Sample of /var/lib/logrotate.status
"/var/log/messages" 2006-8-16
"/var/log/secure" 2006-8-16
"/var/log/maillog" 2006-8-16
"/var/log/spooler" 2006-8-16
"/var/log/boot.log" 2006-8-16
"/var/log/cron" 2006-8-16

The simple solution for this is :

1) Take a back up of the logrotate.status file.
mv /var/lib/logrotate.status /var/lib/logrotate.status.orig

OR

2) Run [tag]logrotate[/tag] command manually to re-generate this file again
logrotate -fv /etc/logrotate.conf

OR

3) Delete the empty logrotate.status and run logrotate again:
/etc/cron.daily/logrotate /etc/logrotate.conf

This should solve the cron problem.

Possibly Related Posts:


Comments

Leave a Reply




Planet Malaysia

  • Follow us on Twitter


  • web www.planetmy.com