在配置的源中找不到配置。 运行 logstash.conf 文件时出错

No configuration found in the configured sources. Error while running logstash.conf file

我正在尝试通过 ELK 堆栈获取 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

有人可以帮我解决为什么我会收到这个错误,用谷歌搜索了很多期刊都没有得到任何解决方案吗?我可以确认提供的所有路径都是正确的。 (Whosebug 中的类似问题未得到正确回答,请不要建议其他答案。请让我知道所需的任何其他详细信息)

谢谢

消息“No config files found in path”表示在 loader 完成读取 path.config 中的文件后,它没有配置。这可能意味着该文件不存在,或者它是空的,或者用户 运行 logstash 没有读取它的权限。