【问题标题】:StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console on windowsStatusLogger 未找到 log4j2 配置文件。使用默认配置:仅将错误记录到 Windows 上的控制台
【发布时间】:2017-08-25 07:43:37
【问题描述】:

我正在尝试在 Windows 上运行 logstash。

使用以下命令 -

logstash.bat -f D:\confignfig.txt --path.settings D:\Software\Elasticsearch\logstash-5.5.0\config\ -l LogstashLogs

但我收到此错误 -

ERROR StatusLogger 找不到 log4j2 配置文件。使用默认值 配置:仅将错误记录到控制台。警告:不能 找到通常位于 $LS_HOME/config 或 /etc/logstash.您可以使用 --path.settings 指定路径。 继续使用默认值 发生意外错误! :错误=> 错误的 URI(不是 URI?): 文件:///D:\Software\Elasticsearch\logstash-5.5.0\config" - LogstashLogs"/log4j2.properties, :backtrace => ["D:/Software/Elasticsearch/logstash-5.5.0/vendor/jruby/lib/ruby/1.9/uri/common.rb:176:in 分裂”, "D:/Software/Elasticsearch/logstash-5.5.0/vendor/jruby/lib/ruby/1.9/uri/common.rb:210:in 解析”, "D:/Software/Elasticsearch/logstash-5.5.0/vendor/jruby/lib/ruby/1.9/uri/common.rb:747:in 解析”, "D:/Software/Elasticsearch/logstash-5.5.0/vendor/jruby/lib/ruby/1.9/uri/common.rb:994:in URI", "D:/Software/Elasticsearch/logstash-5.5.0/logstash-core/lib/logstash/logging/logger.rb:77:in 初始化", "org/jruby/ext/thread/Mutex.java:149:in synchronize'", "D:/Software/Elasticsearch/logstash-5.5.0/logstash-core/lib/logstash/logging/logger.rb:75:in 初始化”, "D:/Software/Elasticsearch/logstash-5.5.0/logstash-core/lib/logstash/runner.rb:229:in 执行”, "D:/Software/Elasticsearch/logstash-5.5.0/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in 跑”, "D:/Software/Elasticsearch/logstash-5.5.0/logstash-core/lib/logstash/runner.rb:209:in 跑”, "D:/Software/Elasticsearch/logstash-5.5.0/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:in 跑”, "D:\Software\Elasticsearch\logstash-5.5.0\lib\bootstrap\environment.rb:71:in (根)"]

知道这里发生了什么吗?任何建议将不胜感激。

【问题讨论】:

  • 从错误消息中可以看出,它指的是 D:\Software\Elasticsearch\logstash-5.5.0,但在屏幕截图上它是 D:\Elasticsearch\logstash-5.5.0。可能存在一些错误配置。

标签: logstash log4j2


【解决方案1】:

这似乎是一个已知问题,预计将在下一个 logstash 版本 5.6.0 中得到修复。

请参考:https://discuss.elastic.co/t/logstash-5-5-0-error-statuslogger-no-log4j2-configuration-file-found/92921 https://github.com/elastic/logstash/issues/7526

【讨论】:

    【解决方案2】:

    从根文件夹运行 logstash 解决了这个问题。我不知道这是否是已知问题,但如果您从 bin 文件夹运行 logstash,您可能会收到“ERROR StatusLogger No log4j2 configuration file found”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-27
      • 1970-01-01
      • 2018-01-02
      • 2019-08-28
      • 1970-01-01
      • 2013-06-29
      • 2014-10-18
      • 2018-01-20
      相关资源
      最近更新 更多