# Logstash is throwing errors

**URL:** <https://discuss.elastic.co/t/logstash-is-throwing-errors/100155>\
**Category:** Logstash\
**Created:** [September 12, 2017, 5:32am UTC](https://discuss.elastic.co/t/logstash-is-throwing-errors/100155 "2017-09-12T05:32:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Narasimha\_Gajje](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@Narasimha\_Gajje](https://discuss.elastic.co/u/Narasimha_Gajje)\
**Post date:** [September 12, 2017, 5:32am UTC](https://discuss.elastic.co/t/logstash-is-throwing-errors/100155/1 "2017-09-12T05:32:12Z")

</div>

Hi Team,

I have downloaded LogStash and configured to push logs to ElasticSearch. When I start the LogStash  
with command logstash -f ../conf/logstash.yml but getting below error. Even I tried to start Logstash with command  
logstash.bat with no arguments but error is same.

An unexpected error occurred! {:error=\>#\<ArgumentError: Setting "" hasn't been registered\>, :backtrace=\>["C:/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:32:in `get_setting'", "C:/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:64:in`set\_value'", "C:/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:83:in `merge'", "org/jruby/RubyHash.java:1342:in`each'", "C:/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:83:in `merge'", "C:/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:135:in`validate\_all'", "C:/logstash-5.5.1/logstash-core/lib/logstash/runner.rb:244:in `execute'", "C:/logstash-5.5.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in`run'", "C:/logstash-5.5.1/logstash-core/lib/logstash/runner.rb:209:in `run'", "C:/logstash-5.5.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:in`run'", "C:\logstash-5.5.1\lib\bootstrap\environment.rb:71:in `(root)'"]}

LogStash configuration yml file  
input { stdin { } }  
output {  
elasticsearch { hosts =\> ["localhost:9200"] }  
stdout { codec =\> rubydebug }  
}

Would some one please let me know if any other configuration is required

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 12, 2017, 5:42am UTC](https://discuss.elastic.co/t/logstash-is-throwing-errors/100155/2 "2017-09-12T05:42:56Z")

</div>

> [@Narasimha\_Gajje](#):
>
> logstash -f ../conf/logstash.yml

You should pass the configuration file/directory using the `-f` flag, not the logstash.yml file.

---

<div class="post-metadata">

**Author:** ![Narasimha\_Gajje](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@Narasimha\_Gajje](https://discuss.elastic.co/u/Narasimha_Gajje)\
**Post date:** [September 12, 2017, 6:06am UTC](https://discuss.elastic.co/t/logstash-is-throwing-errors/100155/3 "2017-09-12T06:06:21Z")

</div>

Thanks Christian.

I didn't see any other configuration file in config folder except logstash.yml. Do I need to create one .conf and if so would you please let me know sample one.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 12, 2017, 6:07am UTC](https://discuss.elastic.co/t/logstash-is-throwing-errors/100155/4 "2017-09-12T06:07:58Z")

</div>

Yes you need to create one, Logstash doesn't know what sort of processing you want to do.

If you want examples, have a read of [https://www.elastic.co/guide/en/logstash/5.5/getting-started-with-logstash.html](https://www.elastic.co/guide/en/logstash/5.5/getting-started-with-logstash.html)

---

<div class="post-metadata">

**Author:** ![Vishal\_Sharma1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishal_sharma1/32/20207_2.png) [@Vishal\_Sharma1](https://discuss.elastic.co/u/Vishal_Sharma1)\
**Post date:** [September 12, 2017, 6:35am UTC](https://discuss.elastic.co/t/logstash-is-throwing-errors/100155/5 "2017-09-12T06:35:10Z")

</div>

or you can just create an empty file with the name logstash.conf.

---

<div class="post-metadata">

**Author:** ![Narasimha\_Gajje](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@Narasimha\_Gajje](https://discuss.elastic.co/u/Narasimha_Gajje)\
**Post date:** [September 12, 2017, 5:19pm UTC](https://discuss.elastic.co/t/logstash-is-throwing-errors/100155/6 "2017-09-12T17:19:27Z")

</div>

Dear Mark & Vishal,

I have created logstash.conf in the bin folder where logstash.bat was located but still I am getting same error.  
Below is the error details when I ran in debug mode.

C:\logstash-5.5.1\bin\>logstash.bat -f logstash.conf --debug

ERROR StatusLogger No log4j2 configuration file found. Using default configurati  
on: logging only errors to the console.  
Sending Logstash's logs to C:/logstash-5.5.1/logs which is now configured via lo  
g4j2.properties  
[2017-09-12T09:51:10,004][DEBUG][logstash.plugins.registry] Adding plugin to the  
registry {:name=\>"fb\_apache", :type=\>:modules, :class=\>#\<LogStash::Modules::Sca  
ffold:0x5793a537 @module\_name="fb\_apache", @directory="C:/logstash-5.5.1/modules  
/fb\_apache/configuration"\>}  
[2017-09-12T09:51:10,029][FATAL][logstash.runner] An unexpected error  
occurred! {:error=\>#\<ArgumentError: Setting "" hasn't been registered\>, :backtra  
ce=\>["C:/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:32:in `get_settin g'", "C:/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:64:in`set\_value'  
", "C:/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:83:in `merge'", "or g/jruby/RubyHash.java:1342:in`each'", "C:/logstash-5.5.1/logstash-core/lib/logs  
tash/settings.rb:83:in `merge'", "C:/logstash-5.5.1/logstash-core/lib/logstash/s ettings.rb:135:in`validate\_all'", "C:/logstash-5.5.1/logstash-core/lib/logstash  
/runner.rb:244:in `execute'", "C:/logstash-5.5.1/vendor/bundle/jruby/1.9/gems/cl amp-0.6.5/lib/clamp/command.rb:67:in`run'", "C:/logstash-5.5.1/logstash-core/li  
b/logstash/runner.rb:209:in `run'", "C:/logstash-5.5.1/vendor/bundle/jruby/1.9/g ems/clamp-0.6.5/lib/clamp/command.rb:132:in`run'", "C:\logstash-5.5.1\lib\bo  
otstrap\environment.rb:71:in `(root)'"]}

Below is content of logstash.conf file  
input { stdin { } }  
output {  
elasticsearch { hosts =\> ["localhost:9200"] }  
stdout { codec =\> rubydebug }  
}

Looks like I am missing something here.

---

<div class="post-metadata">

**Author:** ![Narasimha\_Gajje](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@Narasimha\_Gajje](https://discuss.elastic.co/u/Narasimha_Gajje)\
**Post date:** [September 12, 2017, 6:02pm UTC](https://discuss.elastic.co/t/logstash-is-throwing-errors/100155/7 "2017-09-12T18:02:51Z")

</div>

Surprisingly, all the setup is working with LogStash 2.4.1. I am able to make it run. The mentioned errors in my previous post are with version 5.5.

Is there issue with versions 5 and above.  
Is there any extra configurations is required for these versions.

---

<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:** [October 10, 2017, 6:02pm UTC](https://discuss.elastic.co/t/logstash-is-throwing-errors/100155/8 "2017-10-10T18:02:59Z")

</div>

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