Search code examples
elasticsearchlogstashlogstash-jdbc

Install Logstash error Errno::ENOMEM Duplicate


i am trying to install elasticsearch with logstash for every mysql action.

i stuck when trying to install logstash .

heres my command.

[root@centos-elasticsearch tampung]# rpm -ivh 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
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
Errno::ENOMEM: Cannot allocate memory - systemctl
            spawn at org/jruby/RubyProcess.java:1566
            spawn at org/jruby/RubyKernel.java:1511
        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.3.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:74
   detect_systemd at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:29
  detect_platform at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:24
           detect at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:18
   setup_defaults at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:153
          execute at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:119
              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
Unable to install system startup script for Logstash.

anyone know what must i do? i tried to remove logstash,and reinstall.

but still not success.


i tried to upgrade memory..

after that i tried to reinstall again

and i get this.

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-07T07:44:13.341202+0000", :message=>"No platform selected. Autodetecting...", :platform=>"systemd", :version=>"219", :level=>:warn}
{:timestamp=>"2018-12-07T07:44:13.411454+0000", :message=>"Writing file", :destination=>"/etc/default/logstash"}
Unable to install system startup script for Logstash.

Solution

  • As I already wrote in my previous comment, the first error

    Errno::ENOMEM: Cannot allocate memory

    means that your system is low of phisical memory.

    The second one

    Errno::EISDIR: Is a directory

    means that the file is a directory; and that you cannot open a directory for writing, or create or remove hard links to it.