# Logstash 7 install error Ubuntu 18.04

**URL:** <https://discuss.elastic.co/t/logstash-7-install-error-ubuntu-18-04/176917>\
**Category:** Logstash\
**Created:** [April 15, 2019, 1:33pm UTC](https://discuss.elastic.co/t/logstash-7-install-error-ubuntu-18-04/176917 "2019-04-15T13:33:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lolmcbride](https://avatars.discourse-cdn.com/v4/letter/l/0ea827/32.png) [@lolmcbride](https://discuss.elastic.co/u/lolmcbride)\
**Post date:** [April 15, 2019, 1:33pm UTC](https://discuss.elastic.co/t/logstash-7-install-error-ubuntu-18-04/176917/1 "2019-04-15T13:33:01Z")

</div>

I'm trying to install the ELK stack on a fresh Ubuntu 18.04 server. Elasticsearch and kibana are now working and I've moved onto Logstash but i get the following error when trying to install using apt. I am following the installation guide for deb files on the main [elastic.io](http://elastic.io) site.

After this operation, 294 MB of additional disk space will be used.  
Selecting previously unselected package logstash.  
(Reading database ... 193126 files and directories currently installed.)  
Preparing to unpack .../logstash\_1%3a7.0.0-1\_all.deb ...  
Unpacking logstash (1:7.0.0-1) ...  
Setting up logstash (1:7.0.0-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  
Errno::EBADF: Bad file descriptor - systemctl  
spawn at org/jruby/RubyProcess.java:1567  
spawn at org/jruby/RubyKernel.java:1632  
popen\_run at /usr/share/logstash/vendor/jruby/lib/ruby/stdlib/open3.rb:206  
popen3 at /usr/share/logstash/vendor/jruby/lib/ruby/stdlib/open3.rb:102  
execute at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:74  
detect\_systemd at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:29  
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  
 at /usr/share/logstash/lib/systeminstall/pleasewrap.rb:35

I've no clue what the error means even after some googling so I'm posting it here for some guidance.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [April 15, 2019, 1:46pm UTC](https://discuss.elastic.co/t/logstash-7-install-error-ubuntu-18-04/176917/2 "2019-04-15T13:46:54Z")

</div>

> [@lolmcbride](#):
>
> Illegal reflective access

If you search this forum for that you would get to [here](https://discuss.elastic.co/t/logstash-v-7-0-rc-2-installation-with-java-11-fails/175473/2).

---

<div class="post-metadata">

**Author:** ![lolmcbride](https://avatars.discourse-cdn.com/v4/letter/l/0ea827/32.png) [@lolmcbride](https://discuss.elastic.co/u/lolmcbride)\
**Post date:** [April 15, 2019, 2:16pm UTC](https://discuss.elastic.co/t/logstash-7-install-error-ubuntu-18-04/176917/3 "2019-04-15T14:16:14Z")

</div>

Thanks - that got me on the path. I changed to version 8 OpenJDK and then I had to change the /etc/logstash/startup.options file to reflect that:

# Override Java location

JAVACMD=/usr/bin/java

I then ran the sudo /usr/share/logstash/bin/system-install to update the install script as advised in startup.options. This threw up another error ( on bother!) which was that /etc/default/logstash was a directory - huh?

I removed it and re-ran the /usr/share/logstash/bin/system-install script and it completed without errors. I now have a working ELK stack.

---

<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 13, 2019, 2:29pm UTC](https://discuss.elastic.co/t/logstash-7-install-error-ubuntu-18-04/176917/4 "2019-05-13T14:29:32Z")

</div>

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