几秒钟后Logstash服务将单独停止

时间:2019-04-18 13:35:40

标签: unix service logstash elastic-stack freebsd

我正在尝试在ElasticSearch - Kibana - Logstash服务器上首次配置FreeBSD

我用pkg安装了Logstash

我写在 /etc/rc.conf 文件中:

logstash_enable="YES"
logstash_config="/usr/local/etc/logstash/*.conf"   
logstash_log="YES"
logstash_log_file="/var/log/logstash.log"

我在 /usr/local/logstash/confilg/jvm.options 中设置 jvm.options ,如下所示:

# Xms represents the initial size of total heap space 
# Xmx represents the maximum size of total heap space
-Xms256m 
-Xmx1g

然后,当我执行时:

service logstash start

我得到:

root@toto:/var/log/elasticsearch # service logstash start
Starting logstash.
root@toto:/var/log/elasticsearch # service logstash status
logstash is running as pid 12769.
root@toto:/var/log/elasticsearch # service logstash status
logstash is running as pid 12769.
root@toto:/var/log/elasticsearch # service logstash status
logstash is running as pid 12769.
root@toto:/var/log/elasticsearch # service logstash status
logstash is running as pid 12769.
root@toto:/var/log/elasticsearch # service logstash status
logstash is running as pid 12769.
root@toto:/var/log/elasticsearch # service logstash status
logstash is not running.

每个命令在前一个命令之后1秒执行。我不明白为什么我丢了logstash.pid

根据我在/etc/rc.conf中的配置,我也没有任何logstash.log。

你有什么主意吗?

编辑:

根据@MarcoSantos的回答,这就是我得到的:

root          85439  0.0  0.0    6376   2032  -  SsJ  09:11     0:00.00 daemon: /usr/local/logstash/bin/logstash[92803] (daemon)
root           8461  0.0  0.0    6644   2396  4  S+J  09:11     0:00.00 grep -i logstash

可以,因为logstash用作守护程序。但是开始后6秒钟,我得到了:

root           8461  0.0  0.0    6644   2396  4  S+J  09:11     0:00.00 grep -i logstash

为什么我的守护进程独自停止?

0 个答案:

没有答案