# Unable to gunzip file which is created through logstash gzip =\>true , in a file plugin

**URL:** <https://discuss.elastic.co/t/unable-to-gunzip-file-which-is-created-through-logstash-gzip-true-in-a-file-plugin/132784>\
**Category:** Logstash\
**Created:** [May 22, 2018, 10:40am UTC](https://discuss.elastic.co/t/unable-to-gunzip-file-which-is-created-through-logstash-gzip-true-in-a-file-plugin/132784 "2018-05-22T10:40:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Avanish\_Kumar](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Avanish\_Kumar](https://discuss.elastic.co/u/Avanish_Kumar)\
**Post date:** [May 22, 2018, 10:40am UTC](https://discuss.elastic.co/t/unable-to-gunzip-file-which-is-created-through-logstash-gzip-true-in-a-file-plugin/132784/1 "2018-05-22T10:40:01Z")

</div>

We are unable to gunzip compressed file created through logstash.  
For some file it is successful but for other fails with below error. Request you to address this issue.

// **_[root@mymachine]# gunzip application\_2018-05-22-07.log.gz_**  
// **_gzip: application\_2018-05-22-07.log.gz: invalid compressed data--format violated_**

**logstash conf file contents below:**

output {  
file{  
path =\> "/var/mypath/%{app\_name}\_%{+yyyy-MM-dd-HH}.log.gz"  
codec =\> line { format =\> "%{message}" }  
gzip =\> true  
}  
}

---

<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:** [June 19, 2018, 10:40am UTC](https://discuss.elastic.co/t/unable-to-gunzip-file-which-is-created-through-logstash-gzip-true-in-a-file-plugin/132784/2 "2018-06-19T10:40:05Z")

</div>

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