I am trying to setup logstash in my system, below are the steps I followed
Unzipped and executed this command bin/logstash.bat -f logstash-sample.conf --log.level debug
Logstash started the API successfully, but it got shutdown and showing the below error
Error in reactor loop escaped: closed stream (IOError)
logstash-sample.conf file
input { stdin { } }
output {
elasticsearch { hosts => ["localhost:9200"] }
stdout { codec => rubydebug }
}
see the log
[2022-07-21T10:10:24,558][INFO ][logstash.runner ] Logstash shut down.
[2022-07-21T10:10:24,576][DEBUG][logstash.agent ] Error in reactor loop escaped: closed stream (IOError)
[2022-07-21T10:10:24,579][DEBUG][logstash.agent ] 2022-07-21 10:10:24 +0530: Listen loop error: #<IOError: closed stream>
org/jruby/RubyIO.java:3552:in `select'
C:/Development_Avecto/dev_tools/logstash-7.12.0/vendor/bundle/jruby/2.5.0/gems/puma-4.3.7-java/lib/puma/server.rb:383:in `handle_servers'
C:/Development_Avecto/dev_tools/logstash-7.12.0/vendor/bundle/jruby/2.5.0/gems/puma-4.3.7-java/lib/puma/server.rb:356:in `block in run'
[2022-07-21T10:10:24,580][DEBUG][logstash.agent ] ["org/jruby/RubyIO.java:3067:in `read'", "org/jruby/RubyIO.java:3049:in `read'", "C:/Development_Avecto/dev_tools/logstash-7.12.0/vendor/bundle/jruby/2.5.0/gems/puma-4.3.7-java/lib/puma/reactor.rb:160:in `block in run_internal'", "org/jruby/ext/thread/Mutex.java:164:in `synchronize'", "C:/Development_Avecto/dev_tools/logstash-7.12.0/vendor/bundle/jruby/2.5.0/gems/puma-4.3.7-java/lib/puma/reactor.rb:159:in `block in run_internal'", "org/jruby/RubyArray.java:1809:in `each'", "C:/Development_Avecto/dev_tools/logstash-7.12.0/vendor/bundle/jruby/2.5.0/gems/puma-4.3.7-java/lib/puma/reactor.rb:157:in `run_internal'", "C:/Development_Avecto/dev_tools/logstash-7.12.0/vendor/bundle/jruby/2.5.0/gems/puma-4.3.7-java/lib/puma/reactor.rb:313:in `block in run_in_thread'"]
[2022-07-21T10:10:24,568][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 C_3a_.Development_Avecto.dev_tools.logstash_minus_7_dot_12_dot_0.lib.bootstrap.environment.<main>(C:\Development_Avecto\dev_tools\logstash-7.12.0\lib\bootstrap\environment.rb:89) ~[?:?]
[2022-07-21T10:10:24,581][DEBUG][logstash.agent ] 2022-07-21 10:10:24 +0530: Listen loop error: #<IOError: closed stream>
org/jruby/RubyIO.java:3552:in `select'
C:/Development_Avecto/dev_tools/logstash-7.12.0/vendor/bundle/jruby/2.5.0/gems/puma-4.3.7-java/lib/puma/server.rb:383:in `handle_servers'
C:/Development_Avecto/dev_tools/logstash-7.12.0/vendor/bundle/jruby/2.5.0/gems/puma-4.3.7-java/lib/puma/server.rb:356:in `block in run'
[2022-07-21T10:10:24,584][DEBUG][logstash.agent ] 2022-07-21 10:10:24 +0530: Listen loop error: #<IOError: closed stream>
org/jruby/RubyIO.java:3552:in `select'
C:/Development_Avecto/dev_tools/logstash-7.12.0/vendor/bundle/jruby/2.5.0/gems/puma-4.3.7-java/lib/puma/server.rb:383:in `handle_servers'
C:/Development_Avecto/dev_tools/logstash-7.12.0/vendor/bundle/jruby/2.5.0/gems/puma-4.3.7-java/lib/puma/server.rb:356:in `block in run'
This error usually occurs when the conf file specified is not a valid file or path. Check the entire log to see if there is an error "No configuration found in the configured sources". If the file is under the logstash conf folder then execute the following command from the root folder in windows
bin\logstash -f config\logstash-sample.conf