elastic / logstash

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

Homebrew logstash install fails OSX 7.12.1 because logstash-core doesn't have a gem for that version #12878

Open rabble opened 3 years ago

rabble commented 3 years ago

Logstash installed via brew requires jruby but doesn't install it or tell the user that it's needed. This needs to be fixed at least in documentation which assumes jruby is installed and being used.

logstash 7.12.1 fails to install on osx via brew. This is a fresh install, using brew. It looks like the elastic/tap for logstash-full assumes things about jruby which aren't accurate if you're not using jruby and it's installed via brew as a dependency.

` ~  brew install elastic/tap/logstash-full Thu May 6 15:43:58 2021 ==> Installing logstash-full from elastic/tap ==> Downloading https://artifacts.elastic.co/downloads/logstash/logstash-7.12.1-darwin-x86_64.tar.gz?tap=elastic/homebrew-tap ######################################################################## 100.0% ==> find /usr/local/Cellar/logstash-full/7.12.1/libexec/jdk.app/Contents/Home/bin -type f -exec codesign -f -s - {} ; ==> Caveats Please read the getting started guide located at: https://www.elastic.co/guide/en/logstash/current/getting-started-with-logstash.html

To have launchd start elastic/tap/logstash-full now and restart at login: brew services start elastic/tap/logstash-full Or, if you don't want/need a background service you can just run: logstash ==> Summary 🍺 /usr/local/Cellar/logstash-full/7.12.1: 13,778 files, 592MB, built in 43 seconds ~  brew install elastic/tap/logstash-full Thu May 6 15:43:58 2021 ==> Installing logstash-full from elastic/tap ==> Downloading https://artifacts.elastic.co/downloads/logstash/logstash-7.12.1-darwin-x86_64.tar.gz?tap=elastic/homebrew-tap ######################################################################## 100.0% ==> find /usr/local/Cellar/logstash-full/7.12.1/libexec/jdk.app/Contents/Home/bin -type f -exec codesign -f -s - {} ; ==> Caveats Please read the getting started guide located at: https://www.elastic.co/guide/en/logstash/current/getting-started-with-logstash.html

To have launchd start elastic/tap/logstash-full now and restart at login: brew services start elastic/tap/logstash-full Or, if you don't want/need a background service you can just run: logstash ==> Summary 🍺 /usr/local/Cellar/logstash-full/7.12.1: 13,778 files, 592MB, built in 43 seconds`

` ~  logstash 3399ms  Thu May 6 15:38:35 2021 Using JAVA_HOME defined java: /usr/local/opt/openjdk@11/libexec/openjdk.jdk/Contents/Home OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. [FATAL] 2021-05-06 15:38:53.387 [main] Logstash - Logstash stopped processing because of an error: (GemNotFound) You have requested: logstash-core >= 0

The bundle currently has logstash-core locked at 7.12.1. Try running bundle update logstash-core

If you are updating multiple gems in your Gemfile at once, try passing them all to bundle update org.jruby.exceptions.StandardError: (GemNotFound) You have requested: logstash-core >= 0

The bundle currently has logstash-core locked at 7.12.1. Try running bundle update logstash-core

If you are updating multiple gems in your Gemfile at once, try passing them all to bundle update at usr.local.Cellar.logstash.$7_dot_12_dot_1.libexec.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.resolver.verify_gemfile_dependencies_are_found!(/usr/local/Cellar/logstash/7.12.1/libexec/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/resolver.rb:287) ~[?:?] at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1809) ~[jruby-complete-9.2.13.0.jar:?] at usr.local.Cellar.logstash.$7_dot_12_dot_1.libexec.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.resolver.verify_gemfile_dependencies_are_found!(/usr/local/Cellar/logstash/7.12.1/libexec/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/resolver.rb:255) ~[?:?] at usr.local.Cellar.logstash.$7_dot_12_dot_1.libexec.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.resolver.start(/usr/local/Cellar/logstash/7.12.1/libexec/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/resolver.rb:49) ~[?:?] at usr.local.Cellar.logstash.$7_dot_12_dot_1.libexec.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.resolver.resolve(/usr/local/Cellar/logstash/7.12.1/libexec/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/resolver.rb:22) ~[?:?] at usr.local.Cellar.logstash.$7_dot_12_dot_1.libexec.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.resolve(/usr/local/Cellar/logstash/7.12.1/libexec/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:258) ~[?:?] at usr.local.Cellar.logstash.$7_dot_12_dot_1.libexec.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.specs(/usr/local/Cellar/logstash/7.12.1/libexec/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:170) ~[?:?] at usr.local.Cellar.logstash.$7_dot_12_dot_1.libexec.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.specs_for(/usr/local/Cellar/logstash/7.12.1/libexec/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:237) ~[?:?] at usr.local.Cellar.logstash.$7_dot_12_dot_1.libexec.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.requested_specs(/usr/local/Cellar/logstash/7.12.1/libexec/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:226) ~[?:?] at usr.local.Cellar.logstash.$7_dot_12_dot_1.libexec.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.runtime.definition_method(/usr/local/Cellar/logstash/7.12.1/libexec/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:108) ~[?:?] at usr.local.Cellar.logstash.$7_dot_12_dot_1.libexec.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.runtime.setup(/usr/local/Cellar/logstash/7.12.1/libexec/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:20) ~[?:?] at usr.local.Cellar.logstash.$7_dot_12_dot_1.libexec.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.setup(/usr/local/Cellar/logstash/7.12.1/libexec/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:107) ~[?:?] at usr.local.Cellar.logstash.$7_dot_12_dot_1.libexec.lib.bootstrap.bundler.setup!(/usr/local/Cellar/logstash/7.12.1/libexec/lib/bootstrap/bundler.rb:77) ~[?:?] at usr.local.Cellar.logstash.$7_dot_12_dot_1.libexec.lib.bootstrap.environment.

(/usr/local/Cellar/logstash/7.12.1/libexec/lib/bootstrap/environment.rb:84) ~[?:?] !  ~ `

`{ "homebrew_version": "3.1.5", "used_options": [

], "unused_options": [

], "built_as_bottle": false, "poured_from_bottle": false, "installed_as_dependency": false, "installed_on_request": true, "changed_files": null, "time": 1620326747, "source_modified_time": 1618956848, "compiler": "clang", "aliases": [

], "runtime_dependencies": [

], "source": { "path": "/usr/local/Homebrew/Library/Taps/elastic/homebrew-tap/Formula/logstash-full.rb", "tap": "elastic/tap", "tap_git_head": "addeed4e7d93934ff12fa791ceb72836a69640e7", "spec": "stable", "versions": { "stable": "7.12.1", "head": "", "version_scheme": 0 } }, "arch": "x86_64", "built_on": { "os": "Macintosh", "os_version": "macOS 10.15.7", "cpu_family": "kabylake", "xcode": "12.1", "clt": "12.4.0.0.1.1610135815" } }`

openjdk 11.0.10 2021-01-19 OpenJDK Runtime Environment (build 11.0.10+9) OpenJDK 64-Bit Server VM (build 11.0.10+9, mixed mode)

To reproduce:

  1. Get mac
  2. install homebrew
  3. brew install elastic/tap/logstash-full
  4. run logstash
kares commented 3 years ago

Thanks for the report, I do not have Mac around but the things you run into seems like a packaging issue. Logstash does not maintain the "tap" receipt for brew. Have you tried reporting at their end? If https://artifacts.elastic.co/downloads/logstash/logstash-7.12.1-darwin-x86_64.tar.gz is being downloaded than unpacking the tar should be most of what the brew should do to get a working installation.

logstash 7.12.1 fails to install on osx via brew. This is a fresh install, using brew. It looks like the elastic/tap for logstash-full assumes things about jruby which aren't accurate if you're not using jruby and it's installed via brew as a dependency.

Shouldn't be the case, the JRuby dependency is completely vendored and parts (such as Bundler) are customized. The brew tool should not have such a dependency for the logstash tap.