# Unable to start logstash via conf file in windows

**URL:** https://discuss.elastic.co/t/unable-to-start-logstash-via-conf-file-in-windows/61500
**Category:** Logstash
**Created:** [September 26, 2016, 10:41am UTC](https://discuss.elastic.co/t/unable-to-start-logstash-via-conf-file-in-windows/61500 "2016-09-26T10:41:35Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![bhat64](https://avatars.discourse-cdn.com/v4/letter/b/5daacb/32.png) [@bhat64](https://discuss.elastic.co/u/bhat64)
#### Post date: [September 26, 2016, 10:41am UTC](https://discuss.elastic.co/t/unable-to-start-logstash-via-conf-file-in-windows/61500/1 "2016-09-26T10:41:35Z")

</div>

I am new to ELK. Installed ELK on Windows 7 desktop. Ensured i set the JAVA\_HOME as per the guidelines. ELK services are running, i used nssm. I have a simple logstash.conf file to read tcp as below:

input {  
tcp {  
port =\> 5544  
}  
}

output {  
elasticsearch {  
host =\> "localhost"  
protocol =\> "http"  
}  
}

I ran at cmd prompt using logstash -e 'input { stdin { } } output { stdout {} }' and it worked correctly.

When I try to run logstash using cmd line from bin directory where the conf file sits and give the below command I get the attached

 ![](https://us1.discourse-cdn.com/elastic/original/2X/d/ddb985e23ff488b0370e8f568261e076d90d57f1.png)

error:  
C:\ELK\logstash\bin\>logstash -f logstash.conf  
Settings: Default pipeline workers: 4  
←[31mPipeline aborted due to error {:exception=\>"LogStash::ConfigurationError",  
:backtrace=\>["C:/ELK/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-j  
ava/lib/logstash/config/mixin.rb:88:in `config_init'", "org/jruby/RubyHash.java: 1342:in`each'", "C:/ELK/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.4  
.0-java/lib/logstash/config/mixin.rb:72:in `config_init'", "C:/ELK/logstash/vend or/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/outputs/base.rb:7 9:in`initialize'", "C:/ELK/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-  
2.4.0-java/lib/logstash/output\_delegator.rb:74:in `register'", "C:/ELK/logstash/ vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:1 81:in`start\_workers'", "org/jruby/RubyArray.java:1613:in `each'", "C:/ELK/logst ash/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline. rb:181:in`start\_workers'", "C:/ELK/logstash/vendor/bundle/jruby/1.9/gems/logsta  
sh-core-2.4.0-java/lib/logstash/pipeline.rb:136:in `run'", "C:/ELK/logstash/vend or/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/agent.rb:491:in`  
start\_pipeline'"], :level=\>:error}←[0m  
stopping pipeline {:id=\>"main"}  
The signal HUP is in use by the JVM and will not work correctly on this platform

I also tried logstash -f "C:/ELK/logstash/bin/logstash.conf" no luck!

Please guide me what the issue is?

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 26, 2016, 10:55am UTC](https://discuss.elastic.co/t/unable-to-start-logstash-via-conf-file-in-windows/61500/2 "2016-09-26T10:55:02Z")

</div>

> ```
> host => "localhost"
> 
> ```

Change to:

```
hosts => ["localhost"]

```

---

<div class="post-metadata">

### Author: ![bhat64](https://avatars.discourse-cdn.com/v4/letter/b/5daacb/32.png) [@bhat64](https://discuss.elastic.co/u/bhat64)
#### Post date: [September 26, 2016, 1:21pm UTC](https://discuss.elastic.co/t/unable-to-start-logstash-via-conf-file-in-windows/61500/3 "2016-09-26T13:21:08Z")

</div>

Magnus, I did the change you suggested to logstash.conf and ran the same command logstash –f logstash.conf from the \>bin directory. I also restarted the ELK services and then restarted the desktop too.

I get a little different error now. Should ELK files be in the same path as Java? My Java obviously is in C:/Program Files is that the issue.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/1/1701c86beda88bfb27f55663b7eb39f5300628f5.png)

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 26, 2016, 1:28pm UTC](https://discuss.elastic.co/t/unable-to-start-logstash-via-conf-file-in-windows/61500/4 "2016-09-26T13:28:45Z")

</div>

Drop `protocol => "http"` from your config.

It's seems you're following obsolete documentation. Be careful about that, and make sure you consult the official documentation of the Logstash release you're running.

Please don't post screenshots. Use copy/paste.

---

<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: [July 6, 2017, 4:36am UTC](https://discuss.elastic.co/t/unable-to-start-logstash-via-conf-file-in-windows/61500/5 "2017-07-06T04:36:53Z")

</div>


