无法在Centos7上启动Logstash服务

时间:2017-02-01 17:53:34

标签: logstash

当我尝试在centos 7中启动logstash作为服务时,我总是低于错误。我不是一个很棒的linux家伙,所以任何有关启动限制错误的帮助都会有很大的帮助。我尝试按照一些链接来修复或重置 StartLimitInterval 等,但是徒劳无功。

[root@resource-managers logstash-5.1.1]# service logstash status
Logstash Daemon● logstash.service - logstash
   Loaded: loaded (/etc/systemd/system/logstash.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Wed 2017-02-01 17:49:11 UTC; 741ms ago
  Process: 8562 ExecStart=/home/centos/logstash-5.1.1/bin/logstash --path.settings /home/centos/logstash-5.1.1/config (code=exited, status=217/USER)
 Main PID: 8562 (code=exited, status=217/USER)

Feb 01 17:49:11 resource-managers.cisco.com systemd[1]: Unit logstash.service entered failed state.
Feb 01 17:49:11 resource-managers.cisco.com systemd[1]: logstash.service failed.
Feb 01 17:49:11 resource-managers.cisco.com systemd[1]: logstash.service holdoff time over, schedulin...rt.
Feb 01 17:49:11 resource-managers.cisco.com systemd[1]: start request repeated too quickly for logsta...ice
Feb 01 17:49:11 resource-managers.cisco.com systemd[1]: Failed to start logstash.
Feb 01 17:49:11 resource-managers.cisco.com systemd[1]: Unit logstash.service entered failed state.
Feb 01 17:49:11 resource-managers.cisco.com systemd[1]: logstash.service failed.

此致 基兰

1 个答案:

答案 0 :(得分:2)

我遇到了同样的问题,并解决了它。也许它可以帮助你。

您可以查看${LS_HOME}/config/startup.options文件吗?您应该将LC_USERLC_GROUP设置为现有帐户和组。

# user and group id to be invoked as
LS_USER=elk-test
LS_GROUP=elk-test

在我的系统中,我将默认值“logstash”更改为“elk-etst”。

之后,运行system-install命令,启动服务,它工作正常!

● logstash.service - logstash
   Loaded: loaded (/etc/systemd/system/logstash.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2017-02-05 11:10:04 CST; 8s ago
 Main PID: 7395 (java)
   CGroup: /system.slice/logstash.service
           └─7395 /usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -Djava.awt.headless=true -Df...

ps:我正在运行logstash-5.1.2