Logstash 错误:尝试启动/运行 logstash 时出现“参数过多”

时间:2021-05-25 21:44:38

标签: python django windows elasticsearch logstash

试图在我的 python/django 项目上使用以下命令在 windows 上运行 logstash(使用 git bash):

./logstash -f path/to/logstash.conf

我收到此错误

/c/Program Files/logstash-7.13.0/bin/logstash: line 40: cd: too many arguments
/c/Program Files/logstash-7.13.0/bin/logstash: line 40: /c/Users/Stephanie/Documents/Projects/BidRL/bidrl-reporting/bin/logstash.lib.sh: No such file or directory
/c/Program Files/logstash-7.13.0/bin/logstash: line 41: setup: command not found
/c/Program Files/logstash-7.13.0/bin/logstash: line 59: setup_classpath: command not found
/c/Program Files/logstash-7.13.0/bin/logstash: line 60: exec: : not found

我尝试解决错误的每一步都创建了一个概念。 最终我决定尝试将 logstash 从 c/program 文件移动到 c。 这解决了问题。

我 cd 到 logstash 目录:

cd "/c/logstash-7.13.0/bin/"

然后运行logstash

./logstash -f path/to/logstash.conf

这是输出

Using bundled JDK: /c/logstash-7.13.0/jdk
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
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 /C:/Program Files/logstash-7.13.0/config/log4j2.properties. Using default config which logs errors to the console
[INFO ] 2021-05-25 14:34:41.276 [main] runner - Starting Logstash {"logstash.version"=>"7.13.0", "jruby.version"=>"jruby 9.2.16.0 (2.5.7) 2021-03-03 f82228dc32 OpenJDK 64-Bit Server VM 11.0.10+9 on 11.0.10+9 +indy +jit [mswin32-x86_64]"}
[WARN ] 2021-05-25 14:34:41.360 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
[INFO ] 2021-05-25 14:34:41.602 [Agent thread] configpathloader - No config files found in path {:path=>"C:/logstash-7.13.0/bin/path/to/logstash.conf"}
[ERROR] 2021-05-25 14:34:41.608 [Agent thread] sourceloader - No configuration found in the configured sources.
[INFO ] 2021-05-25 14:34:41.755 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=>9600}
[INFO ] 2021-05-25 14:34:46.864 [LogStash::Runner] runner - Logstash shut down.

它正在启动logstash,但仍有一些错误。

想发布这个,因为没有太多关于它的文档。

This 是我发现非常有用的文档之一:

1 个答案:

答案 0 :(得分:0)