I've tried both on Ubuntu 18.04 and CentOS 7.6. With Java 8, the installations went fine several times, but when I run the command:
$ sudo yum install logstash -y
I will get this output:
Total download size: 169 M Installed size: 293 M Downloading packages: logstash-6.7.0.rpm | 169 MB 00:00:02 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : 1:logstash-6.7.0-1.noarch 1/1 Using provided startup.options file: /etc/logstash/startup.options OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.jruby.util.SecurityHelper to field java.lang.reflect.Field.modifiers WARNING: Please consider reporting this to the maintainers of org.jruby.util.SecurityHelper WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release NoMethodError: undefined method `split' for nil:NilClass detect_systemd at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:33 detect_platform at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:24 detect at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:18 setup_defaults at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:153 execute at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:119 run at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:67 run at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:114 run at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:132 <main> at /usr/share/logstash/lib/systeminstall/pleasewrap.rb:12 /usr/share/logstash/bin/system-install: line 88: systemd: command not found chmod: cannot access '/etc/default/logstash': No such file or directory warning: %post(logstash-1:6.7.0-1.noarch) scriptlet failed, exit status 1 Non-fatal POSTIN scriptlet failure in rpm package 1:logstash-6.7.0-1.noarch Verifying : 1:logstash-6.7.0-1.noarch 1/1 Installed: logstash.noarch 1:6.7.0-1
So logstash is installed but I can't get the startscript installed since the post-install script which comes with the package fails. This happens on both, Ubuntu 18.04 with a similar error, and on CentOS 7.6 with both Oracle Java and Open JDK. The $JAVA_HOME environmental variable is set to the correct path when using the one or the other.
Any ideas? Is that a bug in the package?