1

I'm receiving email prompts from two Ubuntu 14.04 servers around unusual logrotate behaviour. I don't have any packages installed which are not installed on other servers which don't exhibit this behaviour.

The email subject contains this line:

test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

So it seems related to cron.daily. I have not edited anything in cron.daily. The message is:

/etc/cron.daily/logrotate:
gzip: stdin: file size changed while zipping

How can I find which log file is causing this?

Edit:I only get these messages on a Monday morning, which leads me to believe it's on with a weekly directive.

2

1 Answer 1

3

I would suggest to turn on verbosity on logrotate. We need more information on which line causing this error.

Edit /etc/cron.daily/logrotate. At the end of the file there is line /usr/sbin/logrotate /etc/logrotate.conf, change this to /usr/sbin/logrotate --verbose /etc/logrotate.conf.

Or else you might run this directly /usr/sbin/logrotate --verbose /etc/logrotate.conf, but of course some logs will be get rotated if the conditions matching the config file rules for rotation.

2
  • I'd already done this, based on the linked answer by muru, will the verbose output appear in the email?
    – Arronical
    Oct 5, 2015 at 11:55
  • @Arronical by right, you should see the verbosity in the mail as well. You also can look into logrotate.d directory and focus on files that get rotates weekly. i.e containing rotate 7 line. Oct 5, 2015 at 13:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .