Can't install logstash plugins, trying to install them breaks the logstash installation

I'm trying to install the email plugin for logstash by using "logstash-plugin install logstash-output-email", however when I do it I get the following error:

Validating logstash-output-email
Installing logstash-output-email
Error Bundler::InstallError, retrying 1/10
An error occurred while installing logstash-core (5.6.2), and Bundler cannot continue.
Make sure that gem install logstash-core -v '5.6.2' succeeds before bundling.
WARNING: can not set Session#timeout=(0) no session context

After trying to install the plugin, my logstash won't start anymore and gives the error:

Bundler::GemNotFound: Could not find gem 'logstash-output-email (>= 0) java' in any of the gem sources listed in your Gemfile or installed on this machine.
verify_gemfile_dependencies_are_found! at C:/Users/Admin/logstash-5.6.2/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/resolver.rb:328
each at org/jruby/RubyArray.java:1613
verify_gemfile_dependencies_are_found! at C:/Users/Admin/logstash-5.6.2/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/resolver.rb:307
start at C:/Users/Admin/logstash-5.6.2/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/resolver.rb:199
resolve at C:/Users/Admin/logstash-5.6.2/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/resolver.rb:182
resolve at C:/Users/Admin/logstash-5.6.2/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/definition.rb:192
specs at C:/Users/Admin/logstash-5.6.2/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/definition.rb:132
specs_for at C:/Users/Admin/logstash-5.6.2/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/definition.rb:177
requested_specs at C:/Users/Admin/logstash-5.6.2/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/definition.rb:166
requested_specs at C:/Users/Admin/logstash-5.6.2/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/environment.rb:18
setup at C:/Users/Admin/logstash-5.6.2/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/runtime.rb:13
setup at C:/Users/Admin/logstash-5.6.2/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler.rb:122
setup! at C:/Users/Admin/logstash-5.6.2/lib/bootstrap/bundler.rb:67
(root) at C:\Users\Admin\logstash-5.6.2\lib\bootstrap\environment.rb:u6708:

Even though this error message says that it can't find the gem in these sources, the files do contain the line gem "logstash-output-email". I'm really confused as to why I can't just install the plugin. Is there something I can do here to make sure the plugin get installed?

Thanks,
Andrew

Same issue on macOS Sierra and elasticsearch plugin

No help to be offered here? I'd really like to be able to install non-default plugins and searching for help has yielded nothing.

I have the same issue with 5.5.3.
c:\ELK\v553\logstash-5.5.3>bin\logstash-plugin.bat install logstash-output-datadog_metrics
Validating logstash-output-datadog_metrics
Installing logstash-output-datadog_metrics
Error Bundler::InstallError, retrying 1/10
An error occurred while installing logstash-core (5.5.3), and Bundler cannot continue.
Make sure that gem install logstash-core -v '5.5.3' succeeds before bundling.

After trying many other recommendations, but shying away from complicated ruby steps (since i don't know ruby), eventually i did what the error says to try ... Make sure that gem install logstash-core -v '5.5.3' succeeds before bundling.

c:\ELK\v553\logstash-5.5.3>vendor\jruby\bin\gem install logstash-core -v '5.5.3'
jar dependencies for logstash-core-5.5.3-java.gemspec . . .
org.apache.logging.log4j:log4j-api:2.6.2
org.apache.logging.log4j:log4j-core:2.6.2
com.fasterxml.jackson.core:jackson-core:2.7.4
com.fasterxml.jackson.core:jackson-databind:2.7.4
com.fasterxml.jackson.module:jackson-module-afterburner:2.7.4
com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.7.4
Successfully installed logstash-core-5.5.3-java
1 gem installed

c:\ELK\v553\logstash-5.5.3>bin\logstash-plugin.bat install logstash-output-datadog_metrics
Validating logstash-output-datadog_metrics
Installing logstash-output-datadog_metrics
Installation successful

(it was not that simple though. At first the above step "c:\ELK\v553\logstash-5.5.3>vendor\jruby\bin\gem install logstash-core -v '5.5.3'" failed after downloading many gems because of a weird issue from a java jar that i am not sure how it reached!!!

ERROR: While executing gem ... (SystemCallError)
Unknown error - Unknown Error (123) - :c:\XXX\lib\com\fasterxml\jackson\core\jackson-databind\2.7.4\jackson-databind-2.7.4.jar
So i renamed XXX to YYY and ran again and it worked out.

maybe my response from a couple of days ago can help

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.