Logstash 由于错误而停止处理:(SystemExit) exit org.jruby.exceptions.SystemExit

问题描述 投票:0回答:3

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

刚刚安装了Java。然后按照here所述运行logstash。

还验证了 java 安装,如同一页面中所述。

然后当我手动运行logstash时,它首先启动,但随后立即关闭,将其吐到我脸上。

我错过了什么?

PS D:\Vivek\Softwares\logstash-7.12.0-windows-x86_64\logstash-7.12.0> .\bin\logstash.bat -f .\config\syslog.conf
Using JAVA_HOME defined java: C:\Program Files\Java\jdk-16
WARNING, using JAVA_HOME while Logstash distribution comes with a bundled JDK
2021-04-10T09:47:38.036+05:30 [main] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.
Sending Logstash logs to D:/Vivek/Softwares/logstash-7.12.0-windows-x86_64/logstash-7.12.0/logs which is now configured via log4j2.properties
[2021-04-10T09:47:48,897][INFO ][logstash.runner          ] Log4j configuration path used is: D:\Vivek\Softwares\logstash-7.12.0-windows-x86_64\logstash-7.12.0\config\log4j2.properties
[2021-04-10T09:47:48,905][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"7.12.0", "jruby.version"=>"jruby 9.2.13.0 (2.5.7) 2020-08-03 9a89c94bcc Java HotSpot(TM) 64-Bit Server VM 16+36-2231 on 16+36-2231 +indy +jit [mswin32-x86_64]"}
[2021-04-10T09:47:48,995][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2021-04-10T09:47:49,259][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"D:/Vivek/Softwares/logstash-7.12.0-windows-x86_64/logstash-7.12.0/config/syslog.conf"}
[2021-04-10T09:47:49,263][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.
[2021-04-10T09:47:49,415][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}
[2021-04-10T09:47:54,462][INFO ][logstash.runner          ] Logstash shut down.
[2021-04-10T09:47:54,471][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.13.0.jar:?]
        at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.13.0.jar:?]
        at D_3a_.Vivek.Softwares.logstash_minus_7_dot_12_dot_0_minus_windows_minus_x86_64.logstash_minus_7_dot_12_dot_0.lib.bootstrap.environment.<main>(D:\Vivek\Softwares\logstash-7.12.0-windows-x86_64\logstash-7.12.0\lib\bootstrap\environment.rb:89) ~[?:?]
logstash
3个回答
1
投票

消息“No config files find in path”表示当logstash读取完所有配置文件后,它还没有任何配置。这可能是因为您的 syslog.conf 为空,或者它包含无效的 UTF-8 字符(因此被跳过),或者可能是 Logstash 无法读取它。

如果将

--log.level debug
添加到命令行,您应该会收到该文件的“正在读取配置文件”消息。如果您不这样做,那么logstash将无法找到它(例如,它不存在或运行logstash的用户无法读取该目录)。


1
投票

您是否以 root 身份创建了这些文件?如果是的话,你必须

chown logstash:logstash ./yourpipelie/*.conf

0
投票

尝试像这样配置你的conf文件

input{
    file{
        path => "C:/Users/lenovo/Desktop/logs/log-stack.log"
        start_position => "beginning"
    }
}

output{
    stdout{
        codec => json
    }
    elasticsearch{
        hosts => ["https://localhost:9200"]
        user => "elastic"
        password => "EJ1g3dIfT9waFq*8KMVZ"        
    }
}

然后运行命令\logstash.bat -f

© www.soinside.com 2019 - 2024. All rights reserved.