# Error generating a logstash image

**URL:** <https://discuss.elastic.co/t/error-generating-a-logstash-image/377549>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [April 27, 2025, 2:30pm UTC](https://discuss.elastic.co/t/error-generating-a-logstash-image/377549 "2025-04-27T14:30:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bertuz](https://avatars.discourse-cdn.com/v4/letter/b/d26b3c/32.png) [@bertuz](https://discuss.elastic.co/u/bertuz)\
**Post date:** [April 27, 2025, 2:30pm UTC](https://discuss.elastic.co/t/error-generating-a-logstash-image/377549/1 "2025-04-27T14:30:46Z")

</div>

Freshman on elastic stack here. I'm trying to generate a logstash image with the following Dockerfile:

```auto
FROM docker.elastic.co/logstash/logstash:8.1.0

RUN rm -f /usr/share/logstash/pipeline/logstash.conf && \
    bin/logstash-plugin install logstash-filter-translate

```

it creates it, but once run I got a kind of incompatibility exception:

```auto
 	at org.nio4r.Selector.doSelect(Selector.java:237) ~[nio4r_ext.jar:?]
logstash | at org.nio4r.Selector.select(Selector.java:197) ~[nio4r_ext.jar:?]
logstash | at org.nio4r.Selector$INVOKER$i$select.call(Selector$INVOKER$i$select.gen) ~[jruby.jar:?]
logstash | at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneBlock.call(JavaMethod.java:577) ~[jruby.jar:?]
logstash | at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:197) ~[jruby.jar:?]
logstash | at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.puma_minus_5_dot_6_dot_9_minus_java.lib.puma.reactor.RUBY$method$select_loop$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/puma-5.6.9-java/lib/puma/reactor.rb:75) ~[?:?]
logstash | at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.puma_minus_5_dot_6_dot_9_minus_java.lib.puma.reactor.RUBY$method$select_loop$0$ __VARARGS__ (/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/puma-5.6.9-java/lib/puma/reactor.rb:69) ~[?:?]
logstash | at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:80) ~[jruby.jar:?]
logstash | at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:70) ~[jruby.jar:?]
logstash | at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:207) ~[jruby.jar:?]
logstash | at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.puma_minus_5_dot_6_dot_9_minus_java.lib.puma.reactor.RUBY$block$run$1(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/puma-5.6.9-java/lib/puma/reactor.rb:39) ~[?:?]
logstash | at org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:138) ~[jruby.jar:?]
logstash | at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58) ~[jruby.jar:?]
logstash | at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:52) ~[jruby.jar:?]
logstash | at org.jruby.runtime.Block.call(Block.java:139) ~[jruby.jar:?]
logstash | at org.jruby.RubyProc.call(RubyProc.java:318) ~[jruby.jar:?]
logstash | at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:105) ~[jruby.jar:?]
logstash | at java.lang.Thread.run(Thread.java:829) ~[?:?]
logstash exited with code 123

```

if I try to not install the plugin when generating the image:

```auto
FROM docker.elastic.co/logstash/logstash:8.1.0

# no further instructions

```

and I change my `docker-compose.yaml` like this:

```auto
    command: bash -c "bin/logstash-plugin install logstash-filter-translate && logstash -f /etc/logstash/conf.d/logstash.conf "

```

I get the same error. Needless to say, if I don't install the plugin, logstash runs smoothly.

How could I fix this?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [April 27, 2025, 3:31pm UTC](https://discuss.elastic.co/t/error-generating-a-logstash-image/377549/2 "2025-04-27T15:31:40Z")

</div>

Hello and welcome,

> [@bertuz](#):
>
> ```auto
> RUN rm -f /usr/share/logstash/pipeline/logstash.conf && \
> bin/logstash-plugin install logstash-filter-translate
> 
> ```

Why are you trying to install the `translate` filter? It is not required, this is a core filter that already comes bundled.

> [@bertuz](#):
>
> Needless to say, if I don't install the plugin, logstash runs smoothly.

As mentioned, there is no need to install the `translate` filter, it is alreayd bundled.

---

<div class="post-metadata">

**Author:** ![bertuz](https://avatars.discourse-cdn.com/v4/letter/b/d26b3c/32.png) [@bertuz](https://discuss.elastic.co/u/bertuz)\
**Post date:** [April 27, 2025, 3:40pm UTC](https://discuss.elastic.co/t/error-generating-a-logstash-image/377549/3 "2025-04-27T15:40:12Z")

</div>

and you're perfectly right!

```auto
logstash@8e6216dd7f68:~$ ./bin/logstash-plugin list | grep -i transl
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
io/console on JRuby shells out to stty for most operations
logstash-filter-translate
logstash@8e6216dd7f68:~$

```

I was just following along a course, and maybe they were using an old version of logstash, not including that plugin. Appreciated the very quick answer. thanks!

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [April 27, 2025, 4:30pm UTC](https://discuss.elastic.co/t/error-generating-a-logstash-image/377549/4 "2025-04-27T16:30:30Z")

</div>

> [@bertuz](#):
>
> I was just following along a course, and maybe they were using an old version of logstash, not including that plugin.

That's possible, the plugin started getting bundled on version 7.0, which was released around 7 years ago.

The course may be very old or was not updated with recent changes, so other things may not work as well.
