Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logstash 5.2.0 logstash-plugin install produces GemfileNotFound error when run outside of Logstash home directory #6639

Closed
OmarDarwish opened this issue Feb 5, 2017 · 1 comment

Comments

@OmarDarwish
Copy link

Attempting to run log-stash-plugin install <url> for a .zip file fails if run outside of Logstash install directory:

root@d63f05e55035:/tmp/logstash# DEBUG=1 logstash-plugin install file:///tmp/logstash-filter-alter-3.0.0.zip
DEBUG: exec /usr/share/logstash/vendor/jruby/bin/jruby /usr/share/logstash/lib/pluginmanager/main.rb install file:///tmp/logstash-filter-alter-3.0.0.zip
Local file: /tmp/logstash-filter-alter-3.0.0.zip
Installing with strategy: LogStash::PluginManager::PackInstaller::Local
Installing file: /tmp/logstash-filter-alter-3.0.0.zip
Pack uncompressed to /tmp/studtmp-e0428d1d85b42b43e82c6ac8b6f2891f47124cbc0d1f40fcd695cb84c555
Creating the index structure format from /tmp/studtmp-e0428d1d85b42b43e82c6ac8b6f2891f47124cbc0d1f40fcd695cb84c555 to /tmp/studtmp-513bc062953613d534eaa23848b637825d43e8293ba5e0e36038e092b658
Generating indexes in /tmp/studtmp-513bc062953613d534eaa23848b637825d43e8293ba5e0e36038e092b658
Generating Marshal quick index gemspecs for 1 gems
.
Complete
Generated Marshal quick index gemspecs: 0.007s
Generating specs index
Generated specs index: 0.002s
Generating latest specs index
Generated latest specs index: 0.001s
Generating prerelease specs index
Generated prerelease specs index: 0.003s
Compressing indicies
Compressed indicies: 0.008s
Bundler::GemfileNotFound: Could not locate Gemfile or .bundle/ directory
        root at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler.rb:198
   app_cache at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler.rb:210
  initialize at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/source/rubygems.rb:21
  initialize at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/source_list.rb:9
  initialize at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/dsl.rb:20
      inject at /usr/share/logstash/lib/pluginmanager/bundler/logstash_injector.rb:44
     inject! at /usr/share/logstash/lib/pluginmanager/bundler/logstash_injector.rb:23
     execute at /usr/share/logstash/lib/pluginmanager/pack_installer/local.rb:37
     execute at /usr/share/logstash/lib/pluginmanager/install.rb:32
         run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67
     execute at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11
         run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67
         run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132
      (root) at /usr/share/logstash/lib/pluginmanager/main.rb:46

If run from inside Logstash's install directory, it works as expected:

root@d63f05e55035:/usr/share/logstash# DEBUG=1 logstash-plugin install file:///tmp/logstash-filter-alter-3.0.0.zip
DEBUG: exec /usr/share/logstash/vendor/jruby/bin/jruby /usr/share/logstash/lib/pluginmanager/main.rb install file:///tmp/logstash-filter-alter-3.0.0.zip
Local file: /tmp/logstash-filter-alter-3.0.0.zip
Installing with strategy: LogStash::PluginManager::PackInstaller::Local
Installing file: /tmp/logstash-filter-alter-3.0.0.zip
Pack uncompressed to /tmp/studtmp-fe320b182de4dc5bffda2e81a4364a69c604f90d9d5eb85c8bd28816eb90
Creating the index structure format from /tmp/studtmp-fe320b182de4dc5bffda2e81a4364a69c604f90d9d5eb85c8bd28816eb90 to /tmp/studtmp-fc656bd4b1883780d170b37a937f96534adf5991555f4e1332db3d060822
Generating indexes in /tmp/studtmp-fc656bd4b1883780d170b37a937f96534adf5991555f4e1332db3d060822
Generating Marshal quick index gemspecs for 1 gems
.
Complete
Generated Marshal quick index gemspecs: 0.007s
Generating specs index
Generated specs index: 0.002s
Generating latest specs index
Generated latest specs index: 0.000s
Generating prerelease specs index
Generated prerelease specs index: 0.000s
Compressing indicies
Compressed indicies: 0.005s
Installing, logstash-filter-alter, version: 3.0.0 file: /tmp/studtmp-fe320b182de4dc5bffda2e81a4364a69c604f90d9d5eb85c8bd28816eb90/logstash/logstash-filter-alter-3.0.0.gem
Install successful
  • Version: official Logstash 5.2.0-alpine Docker image
@OmarDarwish OmarDarwish changed the title Logstash 5.2.0 logstash-plugin install produces GemfileNotFound when run outside of Logstash home directory Logstash 5.2.0 logstash-plugin install produces GemfileNotFound when run outside of Logstash home directory Feb 5, 2017
@OmarDarwish OmarDarwish changed the title Logstash 5.2.0 logstash-plugin install produces GemfileNotFound when run outside of Logstash home directory Logstash 5.2.0 logstash-plugin install produces GemfileNotFound error when run outside of Logstash home directory Feb 5, 2017
@ph
Copy link
Contributor

ph commented Feb 6, 2017

@OmarDarwish Thanks for reporting the problem, we have already merged a PR that fix this problem and will be released shortly

#6602

The current workaround is to cd in the $LOGSTASH_HOME directory before running the command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants