Running Logstah in Windows

Im running in Windows Logstah the basic Test Official website recommends: logstash.bat -e "input { stdin { } } output { stdout {} }"

but I receive following error in the cmd: ```
"[FATAL] 2023-12-06 14:24:21.428 [main] Logstash - Logstash stopped processing because of an error: (NameError) uninitialized constant Gem::Specification"


Full error:

[FATAL] 2023-12-06 16:56:54.764 [main] Logstash - Logstash stopped processing because of an error: (NameError) uninitialized constant Gem::Specification
org.jruby.exceptions.NameError: (NameError) uninitialized constant Gem::Specification
at org.jruby.RubyModule.const_missing(org/jruby/RubyModule.java:4309) ~[jruby.jar:?]
at RUBY.clear_paths(C:/Users/Alberto/Documents/.../Logstash/MySQL_TO_ELASTICSEARCH_USING_LOGSTASH-main/logstash-8.11.1/vendor/jruby/lib/ruby/stdlib/rubygems.rb:323) ~[?:?]
at RUBY.prepare(C:/Users/Alberto/Documents/.../Logstash/MySQL_TO_ELASTICSEARCH_USING_LOGSTASH-main/logstash-8.11.1/lib/bootstrap/bundler.rb:59) ~[?:?]
at RUBY.setup!(C:/Users/Alberto/Documents/.../Logstash/MySQL_TO_ELASTICSEARCH_USING_LOGSTASH-main/logstash-8.11.1/lib/bootstrap/bundler.rb:82) ~[?:?]
at C_3a_.Users.Alberto.Documents..../.Logstash.MySQL_TO_ELASTICSEARCH_USING_LOGSTASH_minus_main.logstash_minus_8_dot_11_dot_1.lib.bootstrap.environment.(C:\Users\Alberto\Documents.../Logstash\MySQL_TO_ELASTICSEARCH_USING_LOGSTASH-main\logstash-8.11.1\lib\bootstrap\environment.rb:85) ~[?:?]


Any help?

Thanks,

Welcome to the community.

It might be error in unziping LS package or you have restrictions. The code logstash.bat -e "input { stdin { } } output { stdout {} }" is the simplest possible.

You may try a .conf file which is also simple.

input {
  generator {
       message => "2023-11-25 15:51:46 DEBUG Request approved"
	   count => 1
  }
} # input

filter {
    grok {
     match => { "message" => [ "%{TIMESTAMP_ISO8601:timestamp}%{SPACE}%{LOGLEVEL:loglevel}%{SPACE}%{GREEDYDATA:msg}"] }
    }
      date {
	    match => ["timestamp", "yyyy-MM-dd HH:mm:ss"]
        timezone => "Europe/Berlin"
     }
}
output {
    stdout { }
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.