logstash啓動報錯

1.報錯信息
Thread.exclusive is deprecated, use Thread::Mutex
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console
[WARN ] 2019-11-29 00:03:36.506 [LogStash::Runner] multilocal - Ignoring the ‘pipelines.yml’ file because modules or command line options are specified

2.分析:
查看/var/log/message 有logstash報錯信息,
less /var/log/message
Nov 28 23:40:25 localhost logstash: WARNING: Could not find logstash.yml which is typically located in LSHOME/configor/etc/logstash.Youcanspecifythepathusingpath.settings.ContinuingusingthedefaultsNov2823:40:25localhostlogstash:Couldnotfindlog4j2configurationatpath/usr/share/logstash/config/log4j2.properties.UsingdefaultconfigwhichlogserrorstotheconsolelogstashLS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defa ults Nov 28 23:40:25 localhost logstash: Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console 顯示默認logstash會從LS_HOME/config加載配置文件,查看/etc/logstash/startup.options可以知道$LS_HOME的值爲/usr/share/logstash/,該目錄爲logstash的prefix目錄

3.解決辦法:
ln -s /etc/logstash /usr/share/logstash/config

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章