elastic / logstash

Logstash - transport and process your logs, events, or other data
https://www.elastic.co/products/logstash
Other
75 stars 3.5k forks source link

Latest logstash-1.5.0rc3-snapshot5 broken on all platform #3070

Closed ph closed 9 years ago

ph commented 9 years ago
io/console not supported; tty will not be manipulated
Gem::LoadError: You have already activated jar-dependencies 0.1.13, but your Gem
file requires jar-dependencies 0.1.7. Prepending `bundle exec` to your command m
ay solve this.
    setup at C:/logstash-1.5.0-rc3.snapshot5/logstash-1.5.0-rc3.snapshot5/vendor
/bundle/jruby/1.9/gems/bundler-1.9.4/lib/bundler/runtime.rb:34
     each at org/jruby/RubyArray.java:1613
     each at C:/logstash-1.5.0-rc3.snapshot5/logstash-1.5.0-rc3.snapshot5/vendor
/jruby/lib/ruby/1.9/forwardable.rb:201
    setup at C:/logstash-1.5.0-rc3.snapshot5/logstash-1.5.0-rc3.snapshot5/vendor
/bundle/jruby/1.9/gems/bundler-1.9.4/lib/bundler/runtime.rb:19
    setup at C:/logstash-1.5.0-rc3.snapshot5/logstash-1.5.0-rc3.snapshot5/vendor
/bundle/jruby/1.9/gems/bundler-1.9.4/lib/bundler.rb:122
   setup! at C:/logstash-1.5.0-rc3.snapshot5/logstash-1.5.0-rc3.snapshot5/lib/lo
gstash/bundler.rb:51
  execute at C:/logstash-1.5.0-rc3.snapshot5/logstash-1.5.0-rc3.snapshot5/lib/lo
gstash/pluginmanager/list.rb:20
      run at C:/logstash-1.5.0-rc3.snapshot5/logstash-1.5.0-rc3.snapshot5/vendor
/bundle/jruby/1.9/gems/clamp-0.6.4/lib/clamp/command.rb:67
  execute at C:/logstash-1.5.0-rc3.snapshot5/logstash-1.5.0-rc3.snapshot5/vendor
/bundle/jruby/1.9/gems/clamp-0.6.4/lib/clamp/subcommand/execution.rb:11
      run at C:/logstash-1.5.0-rc3.snapshot5/logstash-1.5.0-rc3.snapshot5/vendor
/bundle/jruby/1.9/gems/clamp-0.6.4/lib/clamp/command.rb:67
      run at C:/logstash-1.5.0-rc3.snapshot5/logstash-1.5.0-rc3.snapshot5/vendor
/bundle/jruby/1.9/gems/clamp-0.6.4/lib/clamp/command.rb:132
   (root) at C:\logstash-1.5.0-rc3.snapshot5\logstash-1.5.0-rc3.snapshot5\lib\lo
ph commented 9 years ago

Same issue on macos x.

~/D/logstash-1.5.0-rc3.snapshot5 ❯❯❯ bin/plugin list
Gem::LoadError: You have already activated jar-dependencies 0.1.13, but your Gemfile requires jar-dependencies 0.1.7. Prepending `bundle exec` to your command may solve this.
    setup at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/bundle/jruby/1.9/gems/bundler-1.9.4/lib/bundler/runtime.rb:34
     each at org/jruby/RubyArray.java:1613
     each at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/jruby/lib/ruby/1.9/forwardable.rb:201
    setup at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/bundle/jruby/1.9/gems/bundler-1.9.4/lib/bundler/runtime.rb:19
    setup at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/bundle/jruby/1.9/gems/bundler-1.9.4/lib/bundler.rb:122
   setup! at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/lib/logstash/bundler.rb:51
  execute at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/lib/logstash/pluginmanager/list.rb:20
      run at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/bundle/jruby/1.9/gems/clamp-0.6.4/lib/clamp/command.rb:67
  execute at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/bundle/jruby/1.9/gems/clamp-0.6.4/lib/clamp/subcommand/execution.rb:11
      run at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/bundle/jruby/1.9/gems/clamp-0.6.4/lib/clamp/command.rb:67
      run at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/vendor/bundle/jruby/1.9/gems/clamp-0.6.4/lib/clamp/command.rb:132
   (root) at /Users/ph/Downloads/logstash-1.5.0-rc3.snapshot5/lib/logstash/pluginmanager.rb:12
ph commented 9 years ago

I've looked in the .lock file but we only see a hard dependencies requirement on 0.1.7 and nothing on 0.1.13. But the released tarball includes both jar-dependencies 0.1.7 and 0.1.13.

@suyograo where the files where created locally or on the build server?

ph commented 9 years ago

Doing the following command fix the tarball:

rm -rf vendor/bundle/jruby/1.9/specifications/jar-dependencies-0.1.13.gemspec
rm -rf vendor/bundle/jruby/1.9/gems/jar-dependencies-0.1.13

~/D/logstash-1.5.0-rc3.snapshot5 ❯❯❯ bin/plugin uninstall logstash-input-stdin                                                                                                                                                                                                                                                                                          ⏎
Uninstalling logstash-input-stdin
~/D/logstash-1.5.0-rc3.snapshot5 ❯❯❯ bin/plugin install logstash-input-stdin
Validating logstash-input-stdin
Installing logstash-input-stdin
Installation successful
~/D/logstash-1.5.0-rc3.snapshot5 ❯❯❯ bin/plugin list stdin
logstash-input-stdin

So this look related to a build issue with a rogue gem install?

purbon commented 9 years ago

This recalls me to the issue I saw a few days ago in rbenv in jenkins. The issue was that with jruby we had a jar-dependency gemspec installed by default, so this issue might be related to the upgraded jruby as @ph point out very good.

Removing this gemspec from the bundle solved the issue in jenkins, if this is a similar one.

ph commented 9 years ago

The jar-dependency bundled with this newer version or jruby is still fixed at 0.1.2 and not 0.1.13.

cat vendor/jruby/lib/ruby/gems/shared/specifications/default/jar-dependencies-0.1.2.gemspec

So I am not sure why we 3 versions. So maybe related to jenkins or build.

purbon commented 9 years ago

If related to jenkins or the build, this issue should have been there before the upgrade to 1.7.19, isn't? something change/was fix, with this new jruby that raised this error.

ph commented 9 years ago

No error on the task that generated the build http://build-eu-1.elasticsearch.org/job/logstash_create_zip_artifact_15/jdk=JDK8,label=metal-pool/lastBuild/consoleText

ph commented 9 years ago
cd vendor/bundle/jruby/1.9/specifications
ag jar-dependency

jar-dependencies-0.1.7.gemspec
2:# stub: jar-dependencies 0.1.7 ruby lib
5:  s.name = "jar-dependencies"
16:  s.homepage = "https://github.com/mkristian/jar-dependencies"

jruby-kafka-1.4.0-java.gemspec
27:      s.add_runtime_dependency(%q<jar-dependencies>, ["~> 0"])
31:      s.add_dependency(%q<jar-dependencies>, ["~> 0"])
36:    s.add_dependency(%q<jar-dependencies>, ["~> 0"])

logstash-input-kafka-0.1.13.gemspec
29:      s.add_runtime_dependency(%q<jar-dependencies>, ["= 0.1.7"])
38:      s.add_dependency(%q<jar-dependencies>, ["= 0.1.7"])
48:    s.add_dependency(%q<jar-dependencies>, ["= 0.1.7"])

logstash-output-kafka-0.1.9.gemspec
29:      s.add_runtime_dependency(%q<jar-dependencies>, ["= 0.1.7"])
38:      s.add_dependency(%q<jar-dependencies>, ["= 0.1.7"])
48:    s.add_dependency(%q<jar-dependencies>, ["= 0.1.7"])
ph commented 9 years ago

good catch @suyograo

The lockfile for 1.5 was created with a dependencies on 0.1.13 and since we are doing a multiple steps run to create a package.

see: https://github.com/elastic/logstash/commit/be4dc98f7c58c54a8a63f346f14556813eee8574#diff-efbf03f6386a8f9610003e5858706663R56

untergeek commented 9 years ago

Where's that table-flip icon when you need it?

ph commented 9 years ago

(╯°□°)╯︵ ┻━┻