gpt4 book ai didi

elasticsearch - 我无法在我的机器上启动 logstash。里面的错误信息

转载 作者:行者123 更新时间:2023-12-02 22:11:49 28 4
gpt4 key购买 nike

以下是教程中的测试命令:

./logstash -e 'input { stdin { } } output { stdout {} }'

以下是错误。
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 to console
01:55:14.242 [main] FATAL logstash.runner - An unexpected error occurred! {:error=>#<ArgumentError: Path "/usr/share/logstash/data" must be a writable directory. It is not writable.>, :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/settings.rb:433:in `validate'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:216:in `validate_value'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:132:in `validate_all'", "org/jruby/RubyHash.java:1342:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:131:in `validate_all'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:217:in `execute'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:185:in `run'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "/usr/share/logstash/lib/bootstrap/environment.rb:71:in `(root)'"]}

至于错误消息部分说:
Path "/usr/share/logstash/data" must be a writable directory. It is not writable.

该目录由 logstash 拥有和写入。

任何人都可以提出任何解决方案吗?

最佳答案

您必须以 sudo 模式启动 logstash。那是

host@host:~$ sudo su
root@host:/home/host# cd /usr/share/logstash
root@host:/usr/share/logstash# ./bin/logstash -e 'input { stdin { } } output { stdout {} }'
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 to console
16:18:33.959 [[main]-pipeline-manager] INFO logstash.pipeline - Starting pipeline {"id"=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>1000}
16:18:33.996 [[main]-pipeline-manager] INFO logstash.pipeline - Pipeline main started
The stdin plugin is now waiting for input:
16:18:34.019 [Api Webserver] INFO logstash.agent - Successfully started Logstash API endpoint {:port=>9600}
Hello
2017-06-10T15:18:43.457Z host Hello

关于elasticsearch - 我无法在我的机器上启动 logstash。里面的错误信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44468361/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com