Logstash不是作为服务启动的

时间:2016-08-26 10:55:07

标签: chef logstash

使用主厨

启动logstash作为服务
service 'logstash' do
  supports :status => true, :restart => true, :reload => true
  action [:enable, :restart]
end

我得到了

$ systemctl status logstash
logstash.service - LSB: Starts Logstash as a daemon.
   Loaded: loaded (/etc/rc.d/init.d/logstash)
   Active: active (exited) since Thu 2016-08-25 15:33:11 UTC; 1min 42s ago
  Process: 3235 ExecStart=/etc/rc.d/init.d/logstash start (code=exited, status=0/SUCCESS)

使用systemctl restart logstash

$ systemctl status logstash
logstash.service - LSB: Starts Logstash as a daemon.
   Loaded: loaded (/etc/rc.d/init.d/logstash)
   Active: active (running) since Thu 2016-08-25 15:35:03 UTC; 4s ago
  Process: 3769 ExecStop=/etc/rc.d/init.d/logstash stop (code=exited, status=0/SUCCESS)
  Process: 3773 ExecStart=/etc/rc.d/init.d/logstash start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/logstash.service
           └─3780 /bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=7...

然后导致logstash正常运行

journalctl -u logstash(在手动重启之前)给出了

-- Logs begin at Thu 2016-08-25 15:15:03 UTC. --
Aug 25 15:26:58 machine_ip systemd[1]: Starting LSB: Starts Logstash as a daemon....
Aug 25 15:26:58 machine_ip logstash[3300]: logstash started.
Aug 25 15:26:58 machine_ip systemd[1]: Started LSB: Starts Logstash as a daemon..

它出了什么问题?

0 个答案:

没有答案