# Logstash: File Input in Read Mode does not work - Docker image and Java Version

**URL:** https://discuss.elastic.co/t/logstash-file-input-in-read-mode-does-not-work-docker-image-and-java-version/194488
**Category:** Logstash
**Tags:** docker
**Created:** [August 8, 2019, 6:16pm UTC](https://discuss.elastic.co/t/logstash-file-input-in-read-mode-does-not-work-docker-image-and-java-version/194488 "2019-08-08T18:16:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![MJochim](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@MJochim](https://discuss.elastic.co/u/MJochim)
#### Post date: [August 8, 2019, 6:16pm UTC](https://discuss.elastic.co/t/logstash-file-input-in-read-mode-does-not-work-docker-image-and-java-version/194488/1 "2019-08-08T18:16:53Z")

</div>

Hi,

I’ve started testing what Logstash (7.3.0) can do and I’m having a problem with the File input plugin‘s “read mode.” It fails on gzip'd files. The problem has been reported before, e.g. here:

> [@Does Logstash (7.0.1) support gzip file input?](https://discuss.elastic.co/t/does-logstash-7-0-1-support-gzip-file-input/181862/6):
>
> Hi I have installed java 8 on my mac, and it seems it is working. I am just wondering if I should open a ticket to track this? Thanks Kc

Apparently, the read mode part of the plugin is not compatible with Java \>8. That user solved the problem by installing Java 8. My problem is, I am running Elastic’s official `logstash-oss` docker image, which means I cannot downgrade the JVM (unless I build a custom image based on the official one).

Does anyone have an idea or have you encountered this before? Would [GitHub - elastic/logstash: Logstash - transport and process your logs, events, or other data](https://github.com/elastic/logstash/) be the appropriate repository to file a bug report?

Thanks,

Markus

For the record, this is Logstash’s output:

```auto
[2019-08-08T18:00:54,299][ERROR][logstash.javapipeline] A plugin had an unrecoverable error. Will restart this plugin.
  Pipeline_id:main
  Plugin: <LogStash::Inputs::File mode=>"read", path=>["/var/log/apache2/*-error.log.*.gz"], id=>"d2db8989a7052a6e876386ccf232bb968ab0d5eee5316e27d803f9246d2ca30b", type=>"apache_error", file_completed_action=>"log", file_completed_log_path=>"/dev/null", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_179c5f0a-3fbe-40ce-813f-63d420890a2c", enable_metric=>true, charset=>"UTF-8">, stat_interval=>1.0, discover_interval=>15, sincedb_write_interval=>15.0, start_position=>"end", delimiter=>"\n", close_older=>3600.0, sincedb_clean_after=>1209600.0, file_chunk_size=>32768, file_chunk_count=>140737488355327, file_sort_by=>"last_modified", file_sort_direction=>"asc">
  Error: wrong number of arguments (given 1, expected 0)
  Exception: ArgumentError
  Stack:
    /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.1.10/lib/filewatch/read_mode/handlers/read_zip_file.rb:26:in `handle_specifically'
    /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.1.10/lib/filewatch/read_mode/handlers/base.rb:26:in `handle'
    /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.1.10/lib/filewatch/read_mode/processor.rb:39:in `read_zip_file'
    (rest of stack trace removed)

```

And the relevant part of my pipeline configuration looks like this:

```auto
file {
    path => ["/var/log/apache2/*-error.log.*.gz"]
    type => "apache_error"
    mode => "read"
    file_completed_action => "log"
    file_completed_log_path => "/dev/null"
}

```

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [August 8, 2019, 7:29pm UTC](https://discuss.elastic.co/t/logstash-file-input-in-read-mode-does-not-work-docker-image-and-java-version/194488/2 "2019-08-08T19:29:01Z")

</div>

There is already an [issue](https://github.com/logstash-plugins/logstash-input-file/issues/243) for this.

---

<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: [September 5, 2019, 7:29pm UTC](https://discuss.elastic.co/t/logstash-file-input-in-read-mode-does-not-work-docker-image-and-java-version/194488/3 "2019-09-05T19:29:02Z")

</div>

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