Freshman on elastic stack here. I'm trying to generate a logstash image with the following Dockerfile:
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:
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:
FROM docker.elastic.co/logstash/logstash:8.1.0
# no further instructions
and I change my docker-compose.yaml
like this:
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?