我是Logstash和Elasticsearch的新手。 经过一些测试后,我想重新启动并创建新索引。 但是,我得到了:
root@imageoffice:/etc/logstash/conf.d# sudo -Hu root /usr/share/logstash/bin/logstash --path.settings /etc/logstash/
Sending Logstash logs to /usr/share/logstash/logs which is now configured via log4j2.properties
[2019-04-22T17:00:04,910][FATAL][logstash.runner ] Logstash could not be started because there is already another instance using the configured data directory. If you wish to run multiple instances, you must change the "path.data" setting.
[2019-04-22T17:00:04,965][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
如何简单地重置所有内容并成功运行sudo -Hu root /usr/share/logstash/bin/logstash --path.settings /etc/logstash/
命令?
答案 0 :(得分:1)
该错误消息告诉您,计算机上已经运行了logstash。如果您不希望旧版本运行,请将其关闭或杀死它。
通常,logstash通过启动脚本(systemd等)进行管理。