Selasa, 30 Juni 2020

How to solve Unit logstash.service could not be found

  1 komentar
Check the logstash service status
[root@syslog ~]# service logstash status
Redirecting to /bin/systemctl status logstash.service
Unit logstash.service could not be found.
[root@syslog ~]#
Running following command
[root@syslog ~]# /usr/share/logstash/bin/system-install /etc/logstash/startup.options systemd
Using provided startup.options file: /etc/logstash/startup.options
Manually creating startup for specified platform: systemd
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.31/lib/pleaserun/platform/base.rb:112: warning: constant ::Fixnum is deprecated
Successfully created system startup script for Logstash
[root@syslog ~]#
Check service status and start the service
[root@syslog ~]# service logstash status
Redirecting to /bin/systemctl status logstash.service
● logstash.service - logstash
   Loaded: loaded (/etc/systemd/system/logstash.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
[root@syslog ~]#
[root@syslog ~]# service logstash start
Redirecting to /bin/systemctl start logstash.service
[root@syslog ~]# service logstash status
Redirecting to /bin/systemctl status logstash.service
● logstash.service - logstash
   Loaded: loaded (/etc/systemd/system/logstash.service; disabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-06-30 16:05:17 WIB; 2s ago
 Main PID: 26344 (java)
    Tasks: 24 (limit: 26213)
   Memory: 237.8M
   CGroup: /system.slice/logstash.service
           └─26344 /bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.a>

Jun 30 16:05:17 syslog systemd[1]: Started logstash.

[root@syslog ~]#

1 komentar :

  1. [root@inov ~]# service logstash start
    Redirecting to /bin/systemctl start logstash.service
    Failed to start logstash.service: Unit not found.

    BalasHapus