logstash-plugins / logstash-input-azure_event_hubs

Logstash input for consuming events from Azure Event Hubs
Apache License 2.0
18 stars 30 forks source link

"Cannot Link Java Class" Error (on logstash 5.4.2) #15

Open michaelsteven opened 6 years ago

michaelsteven commented 6 years ago

After installation, when trying to test the plugin, I receive the "cannot link Java class error" below.

Version: This is on logstash 5.4.2. I did not see any errors when trying it on logstash 6.3

Here is the command I used to test my config that produced the error: logstash -f /opt/logstash/pipeline/insights-operational-logs.conf --config.test_and_exit

Here is the error: Sending Logstash's logs to /usr/share/logstash/logs which is now configured via log4j2.properties [2018-07-27T21:12:10,688][ERROR][logstash.plugins.registry] Problems loading a plugin with {:type=>"input", :name=>"azure_event_hubs", :path=>"logstash/inputs/azure_event_hubs", :error_message=>"cannot link Java class com.microsoft.azure.eventprocessorhost.EventProcessorHost (java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory)", :error_class=>NameError, :error_backtrace=>["org/jruby/javasupport/JavaUtilities.java:54:in get_proxy_or_package_under_package'", "file:/usr/share/logstash/vendor/jruby/lib/jruby.jar!/jruby/java/java_package_module_template.rb:14:inmethod_missing'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-azure_event_hubs-1.0.1/lib/logstash/inputs/azure_event_hubs.rb:12:in (root)'", "org/jruby/RubyKernel.java:1040:inrequire'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require'", "/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:inlookup'", "/usr/share/logstash/logstash-core/lib/logstash/plugins/registry.rb:175:in lookup_pipeline_plugin'", "/usr/share/logstash/logstash-core/lib/logstash/plugin.rb:139:inlookup'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:91:in plugin'", "org/jruby/RubyKernel.java:1079:ineval'", "(eval):8:in initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:63:ininitialize'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:259:in execute'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:inrun'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:185:in run'", "/usr/share/logstash/lib/bootstrap/environment.rb:71:in(root)'"]} [2018-07-27T21:12:10,694][FATAL][logstash.runner ] The given configuration is invalid. Reason: Couldn't find any input plugin named 'azure_event_hubs'. Are you sure this is correct? Trying to load the azure_event_hubs input plugin resulted in this error: Problems loading the requested plugin named azure_event_hubs of type input. Error: NameError cannot link Java class com.microsoft.azure.eventprocessorhost.EventProcessorHost (java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory)