hi all
I am using file beat, logstash , elasticsearch and kibana. my filebeat ships logs into logstash, but following error can be found in logstash log:
[2019-01-21T12:30:54,588][ERROR][logstash.pipeline ] Error registering plugin {:pipeline_id=>"main", :plugin=>"#<LogStash::OutputDelegator:0x31d7e2ea>", :error=>"no implicit conversion of Fixnum into String", :thread=>"#<Thread:0x5ab08bfa run>"}
[2019-01-21T12:30:54,603][ERROR][logstash.pipeline ] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<TypeError: no implicit conversion of Fixnum into String>, :backtrace=>["org/jruby/ext/cgi/escape/CGIEscape.java:387:in `escape'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.2.1-java/lib/logstash/outputs/elasticsearch/http_client_builder.rb:150:in `setup_basic_auth'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.2.1-java/lib/logstash/outputs/elasticsearch/http_client_builder.rb:58:in `build'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.2.1-java/lib/logstash/outputs/elasticsearch.rb:234:in `build_client'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.2.1-java/lib/logstash/outputs/elasticsearch/common.rb:25:in `register'", "org/logstash/config/ir/compiler/OutputStrategyExt.java:102:in `register'", "org/logstash/config/ir/compiler/AbstractOutputDelegatorExt.java:46:in `register'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:242:in `register_plugin'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:253:in `block in register_plugins'", "org/jruby/RubyArray.java:1734:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:253:in `register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:594:in `maybe_setup_out_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:263:in `start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:200:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:160:in `block in start'"], :thread=>"#<Thread:0x5ab08bfa run>"}
[2019-01-21T12:30:54,656][ERROR][logstash.agent ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<main>, action_result: false", :backtrace=>nil}
my configuration file is as following:
input {
beats {
port => 5044
}
}
output {
elasticsearch {
hosts => ["http://192.168.170.156:9200"]
index => "mylogstash-%{+YYYY.MM.dd}"
user => logstash_user
password => 123456789
}
}
also i defined logstash_user in kibana console as following:
POST /_xpack/security/user/logstash_user
{
"password" : "123456789",
"roles" : [ "logstash_writer","logstash_system"],
"full_name" : "Internal logstash User"
}
and
POST _xpack/security/role/logstash_writer
{
"cluster": ["manage_index_templates", "monitor"],
"indices": [
{
"names": ["mylogstash-*"],
"privileges": ["read","write","create_index"]
}
]
}
logstash cannot ship logs to elasticsearch and its log shows some errors.
any advice will be so appreciated.