Every week, I seem to be getting the following two Cron messages:
gzip: stdin: file size changed while zipping

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

Not sure what's causing these.


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.

  • 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
  • 1
    Well I don't seem to be getting those messages anymore. Seems like 'delaycompress' worked.
    – Ash
    Aug 19 '13 at 2:15
  • 1
    Which daemon's logrotate file did you add delaycompress to?
    – frabcus
    May 6 '14 at 9:44

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
  • 1
    Thanks. You may also change /usr/sbin/logrotate /etc/logrotate.conf into /usr/sbin/logrotate --verbose /etc/logrotate.conf in /etc/cron.daily/ to find out which logfile is problematic.
    – Jérôme
    Jul 20 '15 at 8:21
  • 2
    Hint: from various posts on the web, samba seems to be problematic at least in Debian.
    – Jérôme
    Jul 20 '15 at 8:30
  • I really liked the suggestion of adding the verbose to debug! Ironically, after doing that I cannot see the same error message that was appearing before anywhere in the debug message... Feb 17 '16 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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