# Gzip error when reading file outut

**URL:** <https://discuss.elastic.co/t/gzip-error-when-reading-file-outut/84363>\
**Category:** Logstash\
**Created:** [May 3, 2017, 7:36am UTC](https://discuss.elastic.co/t/gzip-error-when-reading-file-outut/84363 "2017-05-03T07:36:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_van\_Rossum](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@Mark\_van\_Rossum](https://discuss.elastic.co/u/Mark_van_Rossum)\
**Post date:** [May 3, 2017, 7:36am UTC](https://discuss.elastic.co/t/gzip-error-when-reading-file-outut/84363/1 "2017-05-03T07:36:42Z")

</div>

I have a file output of:

```
file {
    path => "/logs/%{+YYYY}/%{+MM}/%{+dd}/%{backend}"
    codec => line { format => "%{message}"}
    gzip => true
  }

```

That writes logs to a gzipped file. However, when I attempt to read the file with:

```
 cat webapps_out-of-service | gunzip

```

I get:

```
gzip: stdin: not in gzip format

```

Are there different gzip formats or something, otherwise how can I read the file created by Logstash?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 31, 2017, 7:48am UTC](https://discuss.elastic.co/t/gzip-error-when-reading-file-outut/84363/2 "2017-05-31T07:48:25Z")

</div>

Closed on May 31, 2017, 7:48am UTC

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