driskell / log-courier

The Log Courier Suite is a set of lightweight tools created to ship and process log files speedily and securely, with low resource usage, to Elasticsearch or Logstash instances.
Other
419 stars 107 forks source link

version.rb missing from the plugin package #393

Closed sysmonk closed 2 years ago

sysmonk commented 2 years ago

Hi,

We're finally upgraded to newest log-courier(2.9.0) and logstash(8.4.2) and we're seeing errors right out of the box - the logstash-input-courier plugin fails to load:

org.jruby.exceptions.LoadError: (LoadError) no such file to load -- log-courier/version
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1017) ~[jruby.jar:?]
        at RUBY.<main>(/home/logstash/vendor/bundle/jruby/2.6.0/gems/log-courier-2.7.3/lib/log-courier/server.rb:20) ~[?:?]
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1017) ~[jruby.jar:?]
        at home.logstash.vendor.bundle.jruby.$2_dot_6_dot_0.gems.logstash_minus_input_minus_courier_minus_2_dot_7_dot_4_minus_java.lib.logstash.inputs.courier.register(/home/logstash/vendor/bundle/jruby/2.6.0/gems/logstash-input-courier-2.7.4-java/lib/logstash/inputs/courier.rb:78) ~[?:?]
        at home.logstash.logstash_minus_core.lib.logstash.java_pipeline.register_plugins(/home/logstash/logstash-core/lib/logstash/java_pipeline.rb:233) ~[?:?]
        at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1865) ~[jruby.jar:?]
        at home.logstash.logstash_minus_core.lib.logstash.java_pipeline.register_plugins(/home/logstash/logstash-core/lib/logstash/java_pipeline.rb:232) ~[?:?]
        at home.logstash.logstash_minus_core.lib.logstash.java_pipeline.start_inputs(/home/logstash/logstash-core/lib/logstash/java_pipeline.rb:391) ~[?:?]
        at home.logstash.logstash_minus_core.lib.logstash.java_pipeline.start_workers(/home/logstash/logstash-core/lib/logstash/java_pipeline.rb:316) ~[?:?]
        at home.logstash.logstash_minus_core.lib.logstash.java_pipeline.run(/home/logstash/logstash-core/lib/logstash/java_pipeline.rb:190) ~[?:?]
        at home.logstash.logstash_minus_core.lib.logstash.java_pipeline.start(/home/logstash/logstash-core/lib/logstash/java_pipeline.rb:142) ~[?:?]

It looks like the version.rb (located in vendor/bundle/jruby/2.6.0/gems/log-courier-2.7.3/lib/log-courier/version.rb ) file is missing from the plugin when installed through logstash-plugin install logstash-input-courier.

Reproduction steps are simple:

If the version.rb from https://github.com/driskell/log-courier/tree/main/ruby/log-courier/lib/log-courier is copied over - everything starts working properly.