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 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
I've no clue what the error means even after some googling so I'm posting it here for some guidance.