logstash-plugins / logstash-filter-date

Apache License 2.0
7 stars 43 forks source link

Can't load date filter. #94

Closed ageis closed 7 years ago

ageis commented 7 years ago

Logstash 5.3.1, all plugins up-to-date. logstash-filter-date is installed.

[2017-04-25T15:18:12,591][ERROR][logstash.agent           ] Cannot load an invalid configuration {:reason=>"Couldn't find any filter plugin named 'date'. Are you sure this is correct? Trying to load the date filter plugin resulted in this error: Problems loading the requested plugin named date of type filter. Error: RuntimeError \n\n\tyou might need to reinstall the gem which depends on the missing jar or in case there is Jars.lock then resolve the jars with `lock_jars` command\n\nno such file to load -- org/logstash/filters/logstash-filter-date/3.1.0/logstash-filter-date-3.1.0 (LoadError)"}
[2017-04-25T15:18:32,054][ERROR][logstash.plugins.registry] Problems loading a plugin with {:type=>"filter", :name=>"date", :path=>"logstash/filters/date", :error_message=>"\n\n\tyou might need to reinstall the gem which depends on the missing jar or in case there is Jars.lock then resolve the jars with `lock_jars` command\n\nno such file to load -- org/logstash/filters/logstash-filter-date/3.1.0/logstash-filter-date-3.1.0 (LoadError)", :error_class=>RuntimeError, :error_backtrace=>["/usr/share/logstash/vendor/bundle/jruby/1.9/gems/jar-dependencies-0.3.11/lib/jar_dependencies.rb:348:in `do_require'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/jar-dependencies-0.3.11/lib/jar_dependencies.rb:255:in `require_jar'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/jar-dependencies-0.3.11/lib/jar_dependencies.rb:0:in `require_jar_with_block'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/jar-dependencies-0.3.11/lib/jar_dependencies.rb:254:in `require_jar'", "/usr/share/logstash/lib/bootstrap/patches/jar_dependencies.rb:6:in `require_jar'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-date-3.1.4/lib/logstash-filter-date_jars.rb:4:in `(root)'", "org/jruby/RubyKernel.java:1040:in `require'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-date-3.1.4/lib/logstash/filters/date.rb:1:in `(root)'", "org/jruby/RubyKernel.java:1040:in `require'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-date-3.1.4/lib/logstash/filters/date.rb:5:in `(root)'", "/usr/share/logstash/logstash-core/lib/logstash/plugins/registry.rb:1:in `(root)'", "/usr/share/logstash/logstash-core/lib/logstash/plugins/registry.rb:151:in `legacy_lookup'", "/usr/share/logstash/logstash-core/lib/logstash/plugins/registry.rb:133:in `lookup'", "/usr/share/logstash/logstash-core/lib/logstash/plugins/registry.rb:175:in `lookup_pipeline_plugin'", "/usr/share/logstash/logstash-core/lib/logstash/plugin.rb:137:in `lookup'", "org/jruby/RubyKernel.java:1079:in `eval'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:88:in `plugin'", "(eval):1057:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:60:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:139:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:277:in `create_pipeline'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:95:in `register_pipeline'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:264:in `execute'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "/usr/share/logstash/lib/bootstrap/environment.rb:71:in `(root)'"]}
ageis commented 7 years ago

Ended up apt-get remove --purge logstash and re-installed. Now it works.

colinsurprenant commented 7 years ago

thanks for the report @ageis - we actually spotted a problem with the date filter v3.1.4 that is actually missing jars. We yanked that version and published v3.1.5. Could you verify which version of the plugin you have installed now after your purge and if you don't have v3.1.5, I suggest you update it.

colinsurprenant commented 7 years ago

closing this.

ageis commented 7 years ago

@colinsurprenant all good. I updated to 5.3.2 today and I will just note that it's kind of annoying that I have to reinstall non-default plugins (such as logstash-filter-multiline, logstash-output-riemann) on every upgrade. It would be cool if there was some way those were preserved in the environment when Logstash is updated via apt.

colinsurprenant commented 7 years ago

@ageis great! for the plugin update, interesting idea: I would suggest you create an issue about it in the main logstash repo!