我正在尝试在 Windows 上运行 logstash。
刚刚安装了 Java。然后按照说明运行 logstash here。
还按照 same page 中的说明验证了 java 安装。
然后当我运行 logstash manually 时,它首先启动,但随后立即关闭,将其吐在我的脸上。
我错过了什么?
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) ~[?:?]
答案 0 :(得分:1)
提示“No config files found in path”表示当logstash读完所有配置文件时,它没有任何配置。这可能是因为您的 syslog.conf 为空,或者它包含无效的 UTF-8 字符(因此被跳过),或者可能是 logstash 无法读取它。
如果您将 --log.level debug
添加到命令行,您应该会收到该文件的“正在读取配置文件”消息。如果不这样做,则 logstash 无法找到它(例如,它不存在或运行 logstash 的用户无法读取该目录)。
答案 1 :(得分:1)
您是否以 root 身份创建了这些文件?如果是,你必须
import pygame
import piconzero as pz
import time
pygame.init()
pz.init()
pz.setOutputConfig (0,0)
pz.setOutputConfig (1,0)
pz.setOutputConfig (2,0)
pz.setOutputConfig (3,0)
controller = pygame.joystick.Joystick(0)
controller.init()
print('controller initialized')
while True:
try:
for event in pygame.event.get():
if event.type == pygame.JOYBUTTONDOWN:
if event.button == 0:
pz.setOutput (0,1)
pz.setOutput (1,1)
pz.setOutput (2,1)
pz.setOutput (3,1)
time.sleep(1)
elif event.type == pygame.JOYBUTTONUP:
print('button released')
except KeyboardInterrupt:
pz.cleanup()