Thread View: alt.privacy.anon-server
11 messages
11 total messages
Started by Jeremy Bentham
Tue, 21 Jun 2016 19:09
Cron Error with Mail.info
Author: Jeremy Bentham
Date: Tue, 21 Jun 2016 19:09
Date: Tue, 21 Jun 2016 19:09
59 lines
2085 bytes
2085 bytes
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
Re: Cron Error with Mail.info
Author: Anonymous Remailer (austria)
Date: Tue, 21 Jun 2016 20:52
Date: Tue, 21 Jun 2016 20:52
69 lines
2541 bytes
2541 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?
Re: Cron Error with Mail.info
Author: Anonymous
Date: Tue, 21 Jun 2016 21:22
Date: Tue, 21 Jun 2016 21:22
16 lines
1288 bytes
1288 bytes
> 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 This happens when you delete a log file above other same log files. What has happened is that you probably had some logs like this: /var/log/mail.info.1.gz /var/log/mail.info.2.gz /var/log/mail.info.3.gz and you deleted /var/log/mail.info.1.gz. Look and see if that isn't the case in your log file folder. You can either delete the 2 and 3 ... files or create a dummy mail.info.1.gz file. That should stop it.
Re: Cron Error with Mail.info
Author: Anonymous
Date: Tue, 21 Jun 2016 22:07
Date: Tue, 21 Jun 2016 22:07
20 lines
1810 bytes
1810 bytes
On Tue, 21 Jun 2016 17:22:40 -0400 (EDT), Anonymous <anonymous@foto.nl1.torservers.net> 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 > > This happens when you delete a log file above other same log files. >What has happened is that you probably had some logs like this: > >/var/log/mail.info.1.gz >/var/log/mail.info.2.gz >/var/log/mail.info.3.gz > >and you deleted /var/log/mail.info.1.gz. Look and see if that isn't the case in your log file folder. > > You can either delete the 2 and 3 ... files or create a dummy mail.info.1.gz file. That should stop it. It would be better to not create rotated log files at all rather than delete them all later via a separate process.
Re: Cron Error with Mail.info
Author: Nathan Hale
Date: Wed, 22 Jun 2016 01:31
Date: Wed, 22 Jun 2016 01:31
23 lines
1817 bytes
1817 bytes
> On Tue, 21 Jun 2016 17:22:40 -0400 (EDT), Anonymous <anonymous@foto.nl1.torservers.net> 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 >> >> This happens when you delete a log file above other same log files. >> What has happened is that you probably had some logs like this: >> >> /var/log/mail.info.1.gz >> /var/log/mail.info.2.gz >> /var/log/mail.info.3.gz >> >> and you deleted /var/log/mail.info.1.gz. Look and see if that isn't the case in your log file folder. >> >> You can either delete the 2 and 3 ... files or create a dummy mail.info.1.gz file. That should stop it. > > It would be better to not create rotated log files at all rather than delete them all later via a separate process. That is correct. Just delete this line to skip creating a mail.log: /var/log/mail.log
Re: Cron Error with Mail.info
Author: Anonymous
Date: Wed, 22 Jun 2016 03:15
Date: Wed, 22 Jun 2016 03:15
27 lines
2120 bytes
2120 bytes
On Wed, 22 Jun 2016 02:31:39 +0100 (BST), Nathan Hale <nobody@remailer.org.uk> wrote: >> On Tue, 21 Jun 2016 17:22:40 -0400 (EDT), Anonymous <anonymous@foto.nl1.torservers.net> 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 >>> >>> This happens when you delete a log file above other same log files. >>> What has happened is that you probably had some logs like this: >>> >>> /var/log/mail.info.1.gz >>> /var/log/mail.info.2.gz >>> /var/log/mail.info.3.gz >>> >>> and you deleted /var/log/mail.info.1.gz. Look and see if that isn't the case in your log file folder. >>> >>> You can either delete the 2 and 3 ... files or create a dummy mail.info.1.gz file. That should stop it. >> >> It would be better to not create rotated log files at all rather than delete them all later via a separate process. > > That is correct. Just delete this line to skip creating a mail.log: /var/log/mail.log This is not correct and not what I suggested either.
Re: Cron Error with Mail.info
Author: Anonymous Remailer (austria)
Date: Wed, 22 Jun 2016 12:35
Date: Wed, 22 Jun 2016 12:35
5 lines
1028 bytes
1028 bytes
> > This is not correct and not what I suggested either. A typical answer from an obvious prick. If he is wrong, why don't you explain where he is wrong?
Re: Cron Error with Mail.info
Author: Anonymous Remailer (austria)
Date: Wed, 22 Jun 2016 12:56
Date: Wed, 22 Jun 2016 12:56
50 lines
2369 bytes
2369 bytes
> On Wed, 22 Jun 2016 02:31:39 +0100 (BST), Nathan Hale <nobody@remailer.org.uk> wrote:
>
>
>>> On Tue, 21 Jun 2016 17:22:40 -0400 (EDT), Anonymous <anonymous@foto.nl1.torservers.net> 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
>>>>
>>>> This happens when you delete a log file above other same log files.
>>>> What has happened is that you probably had some logs like this:
>>>>
>>>> /var/log/mail.info.1.gz
>>>> /var/log/mail.info.2.gz
>>>> /var/log/mail.info.3.gz
>>>>
>>>> and you deleted /var/log/mail.info.1.gz. Look and see if that isn't the case in your log file folder.
>>>>
>>>> You can either delete the 2 and 3 ... files or create a dummy mail.info.1.gz file. That should stop it.
>>>
>>> It would be better to not create rotated log files at all rather than delete them all later via a separate process.
>>
>> That is correct. Just delete this line to skip creating a mail.log: /var/log/mail.log
>
> This is not correct and not what I suggested either.
This group is what triggers his mail.log bckup:
/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
}
Therefore, removing the /var/log/mail.log line would prevent any mail.log creation. However, rotate 0 is probably doing the same.
Re: Cron Error with Mail.info
Author: Zax
Date: Wed, 22 Jun 2016 13:55
Date: Wed, 22 Jun 2016 13:55
77 lines
3198 bytes
3198 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On Tue, 21 Jun 2016 21:09:23 +0200 (CEST), Jeremy Bentham wrote in
Message-Id: <d94f3ad6159c562f0b67f2ccf0be8f90@anemone.mooo.com>:
> 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/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
> }
You have a couple of conflicting statements in here that might be
causing problems. Try:
/var/log/mail.info
/var/log/mail.warn
/var/log/mail.err
/var/log/mail.log
{
rotate 0
daily
missingok
notifempty
sharedscripts
postrotate
invoke-rc.d rsyslog rotate > /dev/null
endscript
}
You can test this by using logrotate --debug <filename>. No changes
will be written but it will output a verbose log of what's happening.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJXapi6AAoJEC3jHKG+PvqnvkkQAIkW31JDWP7lZBnR2ORKPUV2
fGBLOWTtxFvSa5jKWoDcJxCpZ8imEBOfuMnHJOKhpD/6lh/kJYrd4P3SWy6lxeWz
Ukk1qEZO6CJwTHvVkVNCdbRq09q33iKfhoMFMpIhEfbjLtZ1+KJZxokBGFifV1oq
W8CIVpiR+DTROUs7g2WdNwrKCTM7oFz2rGRbko6FAyfjGZhgqp1s+EYoyQzy4jYh
VvcgH5DXbtomhzvovyq43NZ4LpV+1lHXrqw839eSuP/I5kSAek1miQTDIg6Ru14n
EIKHWvYVIRq7SXyVHf8Qb5JYsjMNOHFPlOF3ObJkWZnnd3KeC/n7ld+dBRtCaoYq
ziFgm2Pq27RiwQRwB9aEPU4lA9oDqbJ7VK8qjEMv20aOtcVgVHwmLipfZkKUVn0z
cAe3FQqnlDD7cJJnRa7FEe3BgDP06pkoPsCV6XfDfETB0SQd8C+52k3GHWNSauPF
7VlJOHqy8+UMv7RqzaIA8yGIiamctGZfdTFd7D+T8iGIad/66UIuTkn8KxIOrEBP
XvrQJjzl0AaIeL0DaOGlbN5wlAdp0+9xqZ3DIb1jh3gkRmRx5YV04CdSUpn63odk
+9erDZg9zp9INCgBkhtN5GtYT/XJl4DvZgO2Qz6Fv0XurjBmUSLExHzVy9jmSfGj
3gW6H0Q3/OZ3XEHnR6DP
=67NG
-----END PGP SIGNATURE-----
--
pub 1024D/228761E7 2003-06-04 Steven Crook <steve@mixmin.net>
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
sub 4096R/BE3EFAA7 created: 2014-11-14 expires: 2016-11-13 usage: S
Re: Cron Error with Mail.info
Author: Anonymous
Date: Wed, 22 Jun 2016 14:07
Date: Wed, 22 Jun 2016 14:07
22 lines
2183 bytes
2183 bytes
On Wed, 22 Jun 2016 14:56:09 +0200 (CEST), "Anonymous Remailer (austria)" <mixmaster@remailer.privacy.at> wrote: >Therefore, removing the /var/log/mail.log line would prevent any mail.log creation. However, rotate 0 is probably doing the same. Removing the /var/log/mail.log line in the logrotate.conf file does not prevent mail.log creation. What it will do is prevent mail.log rotation. The result will be an ever growing mail.log. For someone who is trying to minimize the amount of logs that are kept, it provides exactly the opposite result. rotate 0 prevents creation of rotated log archive files and nulls the mail.log file, at which point it begins growing again until the next rotation. If no mail logging at all is desired, one way to disable it is in the syslog or rsyslog configuration file. Just comment out the appropriate lines like this: #mail.* -/var/log/mail.log #mail.info -/var/log/mail.info #mail.warn -/var/log/mail.warn #mail.err -/var/log/mail.err However, if someone is attacking your mail server, or it begins having other problems, it can be difficult to diagnose until some logging is enabled again.
Re: Cron Error with Mail.info
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads