I am trying to run logstash on Windows.
Just installed Java. Then ran logstash as descirbed here.
Also validated the java install as described in the same page.
And then when I run logstash manually, it first started, but then immediately shutdown, spitting this right on my face.
What am I missing?
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) ~[?:?]
The message "No config files found in path" indicates that when logstash had finished reading all the configuration files it did not have any configuration. That could because your syslog.conf is empty, or it contains invalid UTF-8 characters (so it was skipped), or possibly logstash was unable to read it.
If you add --log.level debug
to the command line you should get a "Reading config file" message for that file. If you do not then logstash was unable to find it (e.g. it does not exist or the directory is not readable by the user running logstash).