elastic / logstash

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

Logstash 6.5.2 Errno::EISDIR: Is a directory - /etc/default/logstash #10201

Open akyong opened 5 years ago

akyong commented 5 years ago

cannot install logstash.

with the following errors.

[root@centos-elasticsearch tampung]# sudo rpm -Uvh logstash-6.5.2.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:logstash-1:6.5.2-1               ################################# [100%]
Using provided startup.options file: /etc/logstash/startup.options
Errno::EISDIR: Is a directory - /etc/default/logstash
                   write at org/jruby/RubyIO.java:3622
                   write at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/installer.rb:32
  block in install_files at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/installer.rb:23
                   yield at org/jruby/RubyYielder.java:102
          block in files at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/platform/systemd.rb:24
                    each at org/jruby/RubyGenerator.java:99
           install_files at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/installer.rb:18
               run_human at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:185
                 execute at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:141
                     run at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:67
                     run at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:114
                     run at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:132
                  <main> at /usr/share/logstash/lib/systeminstall/pleasewrap.rb:12
{:timestamp=>"2018-12-07T08:19:32.036398+0000", :message=>"No platform selected. Autodetecting...", :platform=>"systemd", :version=>"219", :level=>:warn}
{:timestamp=>"2018-12-07T08:19:32.086032+0000", :message=>"Writing file", :destination=>"/etc/default/logstash"}
Unable to install system startup script for Logstash.
[root@centos-elasticsearch tampung]# 

i tried to reinstall logstash but still like this.

i am using centos 7.

logstash-6.5.2-1.rpm

polischouckserg commented 5 years ago

The same for me for logstash-6.5.2.deb and Ubuntu 18.04

danhermann commented 5 years ago

@gryphonest, I could not reproduce this problem on CentOS 7.4. I tried both rpm -ivh logstash-6.5.2.rpm on a clean system and rpm -Uvh logstash-6.5.2.rpm on a system with a previous install of Logstash and both worked without problem. Usually, the Errno::EISDIR: Is a directory - /etc/default/logstash indicates a permissions problem writing to that folder.

akyong commented 5 years ago

i don't know why, but this problem solved when i don't install it using rpm instead using the logstash-6.5.2.tar.gz's file.

CmdrStukov commented 5 years ago

I was getting the same issue with logstash-7.0.0-SNAPSHOT.tar.gz. The install script creates a directory instead of a file and subsequently fails (I am using Debian Buster).

To fix it I had to remove the /etc/default/logstash directory sudo rm -fr /etc/default/logstash

...and create an empty file of the same name sudo touch /etc/default/logstash

before re-running logstash-7.0.0-SNAPSHOT/bin/system-install