Logstash is throwing errors

(Narasimha Gajje) #1

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:inset_value'", "C:/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:83:in merge'", "org/jruby/RubyHash.java:1342:ineach'", "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:invalidate_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:inrun'", "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:inrun'", "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

(Christian Dahlqvist) #2

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

(Narasimha Gajje) #3

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.

(Mark Walkom) #4

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

(Vishal Sharma) #5

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

(Narasimha Gajje) #6

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
[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
[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:inset_value'
", "C:/logstash-5.5.1/logstash-core/lib/logstash/settings.rb:83:in merge'", "or g/jruby/RubyHash.java:1342:ineach'", "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:invalidate_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:inrun'", "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:inrun'", "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.

(Narasimha Gajje) #7

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.

(system) #8

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