error: Compressing program wrote following message to stderr when compressing log /var/log/messages-20190519: gzip: stdin: file size changed while zipping Perhaps, `delaycompression` should be added to /etc/logrotate.d/syslog-ng?
I suggest adding delaycompress to /etc/logrotate.d/syslog-ng
Can you please test whether it really helps?
I added 'daily' and 'delaycompress' to test it on a daily basis. It works. You can add just 'delaycompress' to it.
The strange thing is that this come out just recently and maybe it is related to some other piece of software (logrotate?). I've started seeing these messages as you opened the bug report, but it's only on some of the machines. The configuration file haven't been touched for ages.
Just add `delaycompress` to /etc/logrotate.d/syslog-ng
(In reply to Tomáš Mózes from comment #4) > The strange thing is that this come out just recently and maybe it is > related to some other piece of software (logrotate?). I've started seeing > these messages as you opened the bug report, but it's only on some of the > machines. > > The configuration file haven't been touched for ages. This issue is not very clear and requires some mandatory conditions and skills to detect. It is not app-admin/syslog-ng but app-admin/logrotate issue. For my experiens «delaycompress» option is easy, quick and durty workaround. I'm not responsible about usage of pre-rotate block, but quessing, that HUP signal is sent in postrotate logrotate simply MUST send this signal BEFORE starting compress command. This will fix issue everywhere, not only in discussed case os syslog daemon.
The only thing is that compression is not enabled by default in the syslog's logrotate configuration, so it's weird to add the delayed compression option. Probably both should be added in case we don't find anything better.
/etc/logrotate.conf from the gentoo package contains compress option.
Yeah, the PR adds the delaycompress option to all log files. I've tested on some servers and it seems to have fixed the issue. Thanks
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cff8b1d82fbfc63b4d27db8e1dd43396c849f5d commit 8cff8b1d82fbfc63b4d27db8e1dd43396c849f5d Author: Tomas Mozes <hydrapolic@gmail.com> AuthorDate: 2019-12-19 15:16:36 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2019-12-20 05:45:11 +0000 app-admin/syslog-ng: bump to 3.25.1 Closes: https://bugs.gentoo.org/686276 Package-Manager: Portage-2.3.82, Repoman-2.3.20 Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com> Signed-off-by: Joonas Niilola <juippis@gentoo.org> app-admin/syslog-ng/Manifest | 1 + app-admin/syslog-ng/files/syslog-ng.logrotate | 12 -- .../syslog-ng/files/syslog-ng.logrotate.hardened | 75 --------- .../files/syslog-ng.logrotate.hardened.in | 8 + app-admin/syslog-ng/files/syslog-ng.logrotate.in | 1 + app-admin/syslog-ng/syslog-ng-3.25.1.ebuild | 169 +++++++++++++++++++++ 6 files changed, 179 insertions(+), 87 deletions(-)