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

bin/logstash-plugin install <OFFLINEPACK> require to be in the $LS_HOME to work #6599

Closed
ph opened this issue Jan 27, 2017 · 2 comments
Closed

Comments

@ph
Copy link
Contributor

ph commented Jan 27, 2017

When you run the bin/logstash-plugin install command to install an offline pack you need to be in the $LS_HOME directory for the command to succeed, if you don't Logstash will raise the following exception:

Downloading: |=================================================================|
Downloaded package to: /tmp/studtmp-4bff03f76ebd190d8c07af837bfe790f8252b7075a9eca549dcc7e81ed85/x-pack-5.2.0.zip
Installing file: /tmp/studtmp-4bff03f76ebd190d8c07af837bfe790f8252b7075a9eca549dcc7e81ed85/x-pack-5.2.0.zip
Pack uncompressed to /tmp/studtmp-5c6e053308d4905bea6edc0a8f339ae414d3cd4c54ce185c86b6967cbb29
Creating the index structure format from /tmp/studtmp-5c6e053308d4905bea6edc0a8f339ae414d3cd4c54ce185c86b6967cbb29 to /tmp/studtmp-a1eaed00008b64d30c79fb0e1074e7e53421040f291350ac05ade6701da9
Generating indexes in /tmp/studtmp-a1eaed00008b64d30c79fb0e1074e7e53421040f291350ac05ade6701da9
Generating Marshal quick index gemspecs for 5 gems
.....
Complete
Generated Marshal quick index gemspecs: 0.008s
Generating specs index
Generated specs index: 0.001s
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.001s
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/pack_installer/remote.rb:20
     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
@ph ph self-assigned this Jan 27, 2017
@ph
Copy link
Contributor Author

ph commented Jan 27, 2017

I've changed the Sharedhelpers to return the correct path in that case but now I am running into an issue with the gems defined with path

Bundler::PathError: The path `/Users/ph/es/logstash-core-event-java` does not exist.

If i used a dynamic path I now have this.

Bundler::PathError: The path `/Users/ph/es/(eval)/logstash-core` does not exist.

One of the thing a bit weird is that I run the command in $HOME not in ~/es.

@ph
Copy link
Contributor Author

ph commented Jan 27, 2017

OK, I have a fix to support the relative path of the core gem, I change the current execution path before injecting the dependencies and it seems to work correctly.

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

No branches or pull requests

1 participant