我试图通过麋鹿堆栈获取Springboot日志,并在Kibana查看它们。我可以运行kibana.bat, elasticsearch.bat
文件,没有任何问题。
当我试图运行"logstash -f logstash.conf"
时,获取下面的堆栈跟踪。
D:\ELK\logstash-7.13.2\bin>logstash -f logstash.conf
"Using bundled JDK: ""
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Sending Logstash logs to D:/ELK/logstash-7.13.2/logs which is now configured via log4j2.properties
[2021-06-27T22:31:46,792][INFO ][logstash.runner ] Log4j configuration path used is: D:\ELK\logstash-7.13.2\config\log4j2.properties
[2021-06-27T22:31:46,806][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.13.2", "jruby.version"=>"jruby 9.2.16.0 (2.5.7) 2021-03-03 f82228dc32 OpenJDK 64-Bit Server VM 11.0.11+9 on 11.0.11+9 +indy +jit [mswin32-x86_64]"}
[2021-06-27T22:31:46,961][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2021-06-27T22:31:47,858][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"D:/ELK/logstash-7.13.2/bin/logstash.conf"}
[2021-06-27T22:31:47,865][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.
[2021-06-27T22:31:48,043][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2021-06-27T22:31:53,222][INFO ][logstash.runner ] Logstash shut down.
[2021-06-27T22:31:53,230][FATAL][org.logstash.Logstash ] Logstash stopped processing because of an error: (SystemExit) exit
org.jruby.exceptions.SystemExit: (SystemExit) exit
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:747) ~[jruby-complete-9.2.16.0.jar:?]
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.16.0.jar:?]
at D_3a_.ELK.logstash_minus_7_dot_13_dot_2.lib.bootstrap.environment.<main>(D:\ELK\logstash-7.13.2\lib\bootstrap\environment.rb:89) ~[?:?]
下面是logstash.conf文件
logstash.conf
input {
file{
path=>"C:/Users/jagan/OneDrive/Desktop/logs/elk-stack.log"
start_position=> "beginning"
}
}
output {
elasticsearch { hosts => ["localhost:9200"] }
stdout { codec => rubydebug }
}
logstash.conf文件的位置: D:\ELK\logstash-7.13.2\bin
日志文件的位置: C:\Users\jagan\OneDrive\Desktop\logs\elk-stack.log
能帮我解释一下为什么我会犯这个错误,谷歌上了很多没有解决问题的日志吗?我可以确认所有提供的路径都是正确的。(堆栈溢出中类似的问题没有得到正确的回答,请不要建议其他答案。如有其他需要,请告知我)
谢谢
发布于 2021-06-27 17:37:12
消息“在path中没有找到配置文件”表明,在装载机读取完path.config中的文件之后,它没有配置。这可能意味着文件不存在,或者它是空的,或者运行logstash的用户没有读取它的权限。
https://stackoverflow.com/questions/68153672
复制相似问题