Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Every week, I seem to be getting the following two Cron messages:
/etc/cron.daily/logrotate:
gzip: stdin: file size changed while zipping

/etc/cron.daily/spamassassin:
channel: no 'mirrors.updates.spamassassin.org' record found, channel failed
sa-update failed for unknown reasons

Not sure what's causing these.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Exactly what the messages say.

In the first case something was writing to the file being archived while the archiving was taking place.

In the second case, Spam Assassin was unable to access the mirror it needed to update itself.

share|improve this answer
    
Thanks for the reply. I haven't made any custom changes to the cron.daily directory or logrotate. So, would this be a bug in Debian? –  Ash Aug 12 '13 at 7:41
    
Not sure if you would class it as a bug in Debian (don't want to go there anyway, but see lists.debian.org/debian-user/2012/07/msg01955.html). You can "work around this issue by modifying the scripts in /etc/logrotate.d and removing the "compress", or possibly by adding the "delaycompress" option. –  davidgo Aug 12 '13 at 18:19
    
To look at the spamassassin problem can you provide the output of sa-update and also what happens if you ping mirrors.updates.spamassassin.org –  davidgo Aug 12 '13 at 18:19
    
sa-update does not give me any messages. The ping fails with an 'unknown host' message. –  Ash Aug 13 '13 at 1:10
    
I'll add 'delaycompress' and let you know if it helps. –  Ash Aug 13 '13 at 8:33

Adding delaycompress in relevant log rotation configuration files may help with the first error.

This can be done as default here /etc/logrotate.conf or more specifically in any of the package specific configuration files in /etc/logrotate.d.

About delaycompress (emphasis added):

Postpone compression of the previous log file to the next rotation cycle. This only has effect when used in combination with compress. It can be used when some program cannot be told to close its logfile and thus might continue writing to the previous log file for some time.

so if you add it in the global config file you need to add compress too, which you might not want to do.

Alternatively, you need to track down which package is problematic - not easy but here are some hints:

  • Discover which config files have the compress option on: cd /etc/logrotate.d and then grep "compress" *
  • Of these, find out which ones don't also have delaycompress
  • Compare with the last rotated time in /var/lib/logrotate/status and the size of the log file, and with a bit of inference & hand waving you might have narrowed it down sufficiently
  • Then add delaycompress to the relevant config file e.g. /etc/logrotate.d/PACKAGENAME
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.