logstash-plugins / logstash-output-elastic_app_search

Apache License 2.0
0 stars 9 forks source link

Elastic_app_search output plugin not found on newer Logstash builds despite being shown as installed via bin/logstash-plugin tool #17

Closed henurah closed 3 years ago

henurah commented 3 years ago

I performed a tar.gz install of Logstash 7.9.1 (on both Mac OS and CentOS 8) and installed the logstash-output-elastic_app_search plugin via the bin/logstash-plugin install command and see it listed:

logstash-output-csv
logstash-output-elastic_app_search
logstash-output-elasticsearch
logstash-output-email

But when I run Logstash, I get the following errors:

[2020-09-15T14:15:11,470][ERROR][logstash.plugins.registry] Tried to load a plugin's code, but failed. {:exception=>#<LoadError: no such file to load -- elastic-app-search>, :path=>"logstash/outputs/elastic_app_search", :type=>"output", :name=>"elastic_app_search"}
[2020-09-15T14:15:11,478][ERROR][logstash.agent           ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: (PluginLoadingError) Couldn't find any output plugin named 'elastic_app_search'. Are you sure this is correct? Trying to load the elastic_app_search output plugin resulted in this error: no such file to load -- elastic-app-search", :backtrace=>["org.logstash.config.ir.CompiledPipeline.<init>(CompiledPipeline.java:119)", "org.logstash.execution.JavaBasePipelineExt.initialize(JavaBasePipelineExt.java:82)", "org.logstash.execution.JavaBasePipelineExt$INVOKER$i$1$0$initialize.call(JavaBasePipelineExt$INVOKER$i$1$0$initialize.gen)", "org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:837)", "org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:1169)", "org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuperSplatArgs(IRRuntimeHelpers.java:1156)", "org.jruby.ir.targets.InstanceSuperInvokeSite.invoke(InstanceSuperInvokeSite.java:39)", "Users.henurah.Downloads.Elastic.$7_dot_9_dot_0.logstash_minus_7_dot_9_dot_1.logstash_minus_core.lib.logstash.java_pipeline.RUBY$method$initialize$0(/Users/henurah/Downloads/Elastic/7.9.0/logstash-7.9.1/logstash-core/lib/logstash/java_pipeline.rb:44)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:80)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:70)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)", "org.jruby.RubyClass.newInstance(RubyClass.java:939)", "org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:207)", "Users.henurah.Downloads.Elastic.$7_dot_9_dot_0.logstash_minus_7_dot_9_dot_1.logstash_minus_core.lib.logstash.pipeline_action.create.RUBY$method$execute$0(/Users/henurah/Downloads/Elastic/7.9.0/logstash-7.9.1/logstash-core/lib/logstash/pipeline_action/create.rb:52)", "Users.henurah.Downloads.Elastic.$7_dot_9_dot_0.logstash_minus_7_dot_9_dot_1.logstash_minus_core.lib.logstash.pipeline_action.create.RUBY$method$execute$0$__VARARGS__(/Users/henurah/Downloads/Elastic/7.9.0/logstash-7.9.1/logstash-core/lib/logstash/pipeline_action/create.rb)", "org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:80)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:70)", "org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:207)", "Users.henurah.Downloads.Elastic.$7_dot_9_dot_0.logstash_minus_7_dot_9_dot_1.logstash_minus_core.lib.logstash.agent.RUBY$block$converge_state$2(/Users/henurah/Downloads/Elastic/7.9.0/logstash-7.9.1/logstash-core/lib/logstash/agent.rb:357)", "org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:138)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:52)", "org.jruby.runtime.Block.call(Block.java:139)", "org.jruby.RubyProc.call(RubyProc.java:318)", "org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:105)", "java.base/java.lang.Thread.run(Thread.java:832)"]}
warning: thread "Converge PipelineAction::Create<main>" terminated with exception (report_on_exception is true):
LogStash::Error: Don't know how to handle `Java::JavaLang::IllegalStateException` for `PipelineAction::Create<main>`
          create at org/logstash/execution/ConvergeResultExt.java:129
             add at org/logstash/execution/ConvergeResultExt.java:57
  converge_state at /Users/henurah/Downloads/Elastic/7.9.0/logstash-7.9.1/logstash-core/lib/logstash/agent.rb:370

Please let me know if there are any other details I can provide. Thank you!

andsel commented 3 years ago

To reproduce locallly:

lucaghersi commented 3 years ago

HI, I'm still facing the same issue in a completely new installation of Logstash 7.9.1; after the successful installation of the plugin I still have the same issue listed at the beginning of the thread - same error. Is there anything I need to do to benefit from this fix?

andsel commented 3 years ago

Logstash 7.9.0 ships with logstash-output-elastic_app_search 1.1.0 while the bug was solved in 1.1.1 What's the output of bin/logstash-plugin list 'logstash-output-elastic_app_search' ? Try an update in case, with bin/logstash-plugin update elastic_app_search

lucaghersi commented 3 years ago

Thanks, it was all on me. I started from Docker image and installed the plugin because I thought it wasn't there - this gave me a positive outcome but in fact the plugin was already installed with the previous version and install do not update an existing plugin. I moved the docker file to update command and now the pipeline loads successfully.