# Logstash 6.7 and Java 11 with .deb or .rpm repositories not working

**URL:** <https://discuss.elastic.co/t/logstash-6-7-and-java-11-with-deb-or-rpm-repositories-not-working/174505>\
**Category:** Logstash\
**Created:** [March 29, 2019, 9:29am UTC](https://discuss.elastic.co/t/logstash-6-7-and-java-11-with-deb-or-rpm-repositories-not-working/174505 "2019-03-29T09:29:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![arviaja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arviaja/32/43071_2.png) [@arviaja](https://discuss.elastic.co/u/arviaja)\
**Post date:** [March 29, 2019, 9:29am UTC](https://discuss.elastic.co/t/logstash-6-7-and-java-11-with-deb-or-rpm-repositories-not-working/174505/1 "2019-03-29T09:29:12Z")

</div>

Hi there,

I've been trying to install Logstash 6.7 from the repositories which Elastic provides (based on these guides [RPM](https://www.elastic.co/guide/en/kibana/6.7/rpm.html) and [DEB](https://www.elastic.co/guide/en/kibana/6.7/deb.html) and Java 11 from Oracle and alternatively with OpenJDK 11.

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:

```auto
$ sudo yum install logstash -y

```

I will get this output:

```auto
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?

---

<div class="post-metadata">

**Author:** ![arviaja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arviaja/32/43071_2.png) [@arviaja](https://discuss.elastic.co/u/arviaja)\
**Post date:** [March 29, 2019, 11:53am UTC](https://discuss.elastic.co/t/logstash-6-7-and-java-11-with-deb-or-rpm-repositories-not-working/174505/2 "2019-03-29T11:53:44Z")

</div>

Quick update: I've also installed Oracle Java 8 to see if the script still fails.

It does run through. So that's for now my workaround. After the installation, it seems you can switch back to Java 11, so far Logstash is running fine

---

<div class="post-metadata">

**Author:** ![admlko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/admlko/32/21787_2.png) [@admlko](https://discuss.elastic.co/u/admlko)\
**Post date:** [April 3, 2019, 6:26am UTC](https://discuss.elastic.co/t/logstash-6-7-and-java-11-with-deb-or-rpm-repositories-not-working/174505/3 "2019-04-03T06:26:04Z")

</div>

I can confirm this behavior.

Logstash RPM installation fails with OpenJDK 11, downgrading to OpenJDK 8 helps.

EDIT: Same issue with Oracle JDK 11. So it is not an OpenJDK issue alone.

---

<div class="post-metadata">

**Author:** ![arviaja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arviaja/32/43071_2.png) [@arviaja](https://discuss.elastic.co/u/arviaja)\
**Post date:** [April 3, 2019, 6:58am UTC](https://discuss.elastic.co/t/logstash-6-7-and-java-11-with-deb-or-rpm-repositories-not-working/174505/4 "2019-04-03T06:58:45Z")

</div>

Thanks for the confirmation. I will file a bug with Elastic

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 1, 2019, 6:58am UTC](https://discuss.elastic.co/t/logstash-6-7-and-java-11-with-deb-or-rpm-repositories-not-working/174505/5 "2019-05-01T06:58:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
