Gzip compression results to uncompressable package


so, after a few years, any way to work around this problem?

same problem on logstash 7.13.1

zgrep '2021' zimbra.log.2021-01-30-1613154813.gz

gzip: zimbra.log.2021-01-30-1613154813.gz: invalid compressed data--format violated
root@logstash:# yum info logstash

Installed Packages
Name        : logstash
Arch        : x86_64
Epoch       : 1
Version     : 7.13.1
Release     : 1
Size        : 596 M
Repo        : installed
Summary     : An extensible logging pipeline
URL         : https://www.elastic.co/logstash
License     : Elastic License
Description : An extensible logging pipeline

It might help if you provided a reproducible example. When I run logstash with

input { generator { count => 1 lines => [ '' ] } }
filter { }
output { file { path => "/tmp/foo.txt.gz" gzip => true } }

zgrep and gunzip do not complain about the resulting file. If I run with

input { stdin {} }
filter { }
output { file { path => "/tmp/foo.txt.gz" gzip => true } }

then, as you would expect, zgrep will complain about the file whilst logstash is running, but if I kill -TERM logstash then gunzip no longer complains about the unexpected end of file.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.