Article View: alt.privacy.anon-server
Article #283198Re: Cron Error with Mail.info
From: Cornelis Tromp
Date: Wed, 22 Jun 2016 19:01
Date: Wed, 22 Jun 2016 19:01
75 lines
2975 bytes
2975 bytes
> On Tue, 21 Jun 2016 21:09:23 +0200 (CEST), you wrote:
>
>>
>> I'm getting this error message daily in my cron job:
>>
>> etc/cron.daily/logrotate:
>> error: error opening /var/log/mail.info.1.gz: No such file or
>> directory
>> run-parts: /etc/cron.daily/logrotate exited with return code 1
>>
>> How can I get rid of this error message in my crontab?
>>
>> Here's my data from rsyslog in logrotate.d directory information:
>>
>>
>> /var/log/syslog
>> {
>> rotate 3
>> daily
>> missingok
>> notifempty
>> delaycompress
>> compress
>> postrotate
>> invoke-rc.d rsyslog rotate > /dev/null
>> endscript
>> }
>> /var/log/mail.info
>> /var/log/mail.warn
>> /var/log/mail.err
>> /var/log/mail.log
>> {
>> rotate 0
>> daily
>> missingok
>> notifempty
>> compress
>> delaycompress
>> sharedscripts
>> postrotate
>> invoke-rc.d rsyslog rotate > /dev/null
>> endscript
>> }
>> /var/log/daemon.log
>> /var/log/kern.log
>> /var/log/auth.log
>> /var/log/user.log
>> /var/log/lpr.log
>> /var/log/cron.log
>> /var/log/debug
>> /var/log/messages
>> {
>> rotate 1
>> daily
>> missingok
>> notifempty
>> compress
>> delaycompress
>> sharedscripts
>> postrotate
>> invoke-rc.d rsyslog rotate > /dev/null
>> endscript
>
> One more piece of information. I also have this in my crontab:
>
> 0 5 * * * cd /var/log/ && find . -name '*.gz' -delete && find . -
> name '*.1' -delete
>
> If I added &> /dev/null at the end would this get rid of my errors?
With that further information, you will have to delete any other /var/log/?.n files. You have actually deleted mail.log.1 and this is confusing the logrotate when it tries to .gz it.
It looks like your cron is deleting every *.1 log file. I don't think that is a good idea. syslog is an important log to be able to trace problems. I would suggest you make any log deletes this way is to be more specific.
0 5 * * * cd /var/log/ && find . - name 'mail.log.1' -delete && find . -name 'mail.log.*.gz' -delete
Technical Details
Message-ID:
<59caf646a6333cadda1ef3c0ac711e30@anon.holland.remailer.nl>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mailReferences:
<20b4d4ad467051a799bd1667eb6ae5dd@remailer.privacy.at>Show Full Headers
Complete Article Headers
Message-ID: <59caf646a6333cadda1ef3c0ac711e30@anon.holland.remailer.nl> Subject: Re: Cron Error with Mail.info Date: Wed, 22 Jun 2016 19:01:41 +0000 From: Cornelis Tromp <nobody@holland.remailer.nl> References: <20b4d4ad467051a799bd1667eb6ae5dd@remailer.privacy.at> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mail Newsgroups: alt.privacy.anon-server Organization: dizum.com - The Internet Problem Provider X-Abuse: abuse@dizum.com Injection-Info: sewer.dizum.com - 194.109.206.211 Lines: 75