Logstash start error

[es@localhost logstash-6.2.2]$ ./bin/logstash -e 'input { stdin { } } output { elasticsearch { host => localhost } }'
Sending Logstash's logs to /home/soft/logstash/logstash-6.2.2/logs which is now configured via log4j2.properties
[2018-03-05T10:51:29,856][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"/home/soft/logstash/logstash-6.2.2/modules/netflow/configuration"}
[2018-03-05T10:51:29,883][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/home/soft/logstash/logstash-6.2.2/modules/fb_apache/configuration"}
[2018-03-05T10:51:30,472][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-03-05T10:51:31,308][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.2.2"}
[2018-03-05T10:51:31,961][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2018-03-05T10:51:33,900][ERROR][logstash.outputs.elasticsearch] Unknown setting 'host' for elasticsearch
[2018-03-05T10:51:33,924][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Something is wrong with your configuration.", :backtrace=>["/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/config/mixin.rb:89:in config_init'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/outputs/base.rb:63:ininitialize'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/output_delegator_strategies/shared.rb:3:in initialize'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/output_delegator.rb:24:ininitialize'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/plugins/plugin_factory.rb:85:in plugin'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/pipeline.rb:112:inplugin'", "(eval):12:in <eval>'", "org/jruby/RubyKernel.java:994:ineval'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/pipeline.rb:84:in initialize'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/pipeline.rb:169:ininitialize'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/pipeline_action/create.rb:40:in execute'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/agent.rb:315:inblock in converge_state'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/agent.rb:141:in with_pipelines'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/agent.rb:312:inblock in converge_state'", "org/jruby/RubyArray.java:1734:in each'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/agent.rb:299:inconverge_state'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/agent.rb:166:in block in converge_state_and_update'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/agent.rb:141:inwith_pipelines'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/agent.rb:164:in converge_state_and_update'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/agent.rb:90:inexecute'", "/home/soft/logstash/logstash-6.2.2/logstash-core/lib/logstash/runner.rb:348:in block in execute'", "/home/soft/logstash/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:inblock in initialize'"]}

Hi, You can see the error (or one of them) here:

[2018-03-05T10:51:33,900][ERROR][logstash.outputs.elasticsearch] Unknown setting 'host' for elasticsearch

You could try changing "host" to "hosts" ie:

./bin/logstash -e 'input { stdin { } } output { elasticsearch { hosts => ["localhost:9200"] } }'

Take a look at the examples: https://www.elastic.co/guide/en/logstash/current/config-examples.html

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