# Running Logstah in Windows

**URL:** <https://discuss.elastic.co/t/running-logstah-in-windows/348749>\
**Category:** Logstash\
**Created:** [December 6, 2023, 4:53pm UTC](https://discuss.elastic.co/t/running-logstah-in-windows/348749 "2023-12-06T16:53:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alberto\_Jimenez1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alberto_jimenez1/32/124188_2.png) [@Alberto\_Jimenez1](https://discuss.elastic.co/u/Alberto_Jimenez1)\
**Post date:** [December 6, 2023, 4:53pm UTC](https://discuss.elastic.co/t/running-logstah-in-windows/348749/1 "2023-12-06T16:53:41Z")

</div>

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"

```auto

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) ~[?:?]

```auto

Any help?

Thanks,
```

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [December 7, 2023, 10:52am UTC](https://discuss.elastic.co/t/running-logstah-in-windows/348749/2 "2023-12-07T10:52:37Z")

</div>

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.

```auto
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 { }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 4, 2024, 10:53am UTC](https://discuss.elastic.co/t/running-logstah-in-windows/348749/3 "2024-01-04T10:53:05Z")

</div>

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