da_Teng
(Da Teng)
August 18, 2016, 4:07am
1
{:timestamp=>"2016-08-18T02:38:07.483000+0000", :message=>"Encountered an unexpected error submitting a bulk request! Will retry.", :error_message=>"Cabin::Channel#error(message, data={}) - second argument you gave me wasa Array, I require a Hash.", :class=>"ArgumentError", :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/1.9/gems/cabin-0.8.1/lib/cabin/mixins/logger.rb:72:in error'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-4.1.3-java/lib/logstash/outputs/elasticsearch/common.rb:75:in
retrying_submit'", "org/jruby/RubyArray.java:1613:in each'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-4.1.3-java/lib/logstash/outputs/elasticsearch/common.rb:75:in
retrying_submit'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-4.1.3-java/lib/logstash/outputs/elasticsearch/common.rb:23:in multi_receive'", "org/jruby/RubyArray.java:1653:in
each_slice'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-4.1.3-java/lib/logstash/outputs/elasticsearch/common.rb:22:in multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/output_delegator.rb:136:in
threadsafe_multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/output_delegator.rb:122:in multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:291:in
output_batch'", "org/jruby/RubyHash.java:1342:in each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:291:in
output_batch'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:242:in worker_loop'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:215:in
start_workers'"], :level=>:error}
This is error report.
input {
kafka {
bootstrap_servers => "cstr-01:9092,cstr-02:9092,cstr-03:9092"
group_id => "logstash"
topics => ["online"]
auto_offset_reset => latest
consumer_threads => 3
#queue_size => 50000
#rebalance_max_retries => 4
}
}
filter {
json {
source => "message"
}
# geoip {
# source => "IP"
# }
date {
locale => "zh-cmn"
match => [ "TIMESTAMP", "UNIX" ]
timezone => "Asia/Shanghai"
}
}
output {
elasticsearch {
hosts => ["10.144.179.79:9200"]
index => "logstash-reporter-access-%{+YYYY.MM.dd}"
}
# stdout { codec => rubydebug }
}
This is my configration.
Anyone knows how to resolve this error?
Best regard!
warkolm
(Mark Walkom)
August 18, 2016, 6:52am
2
That's why.
What version are you on? I can't see a topics
in the docs Kafka input plugin | Logstash Reference [8.11] | Elastic
It seems the configuration for the Kafka input plugin has changed between Logstash 2.x and Logstash 5.0, and the config you have specified seems to be according to the Logstash 5.0 specification . Which version of Logstash are you using?
da_Teng
(Da Teng)
August 18, 2016, 7:18am
4
Hi,warkolm!
I use logstash-5.0.0-alpha5.You can see this document and you will find topics
https://www.elastic.co/guide/en/logstash/5.0/plugins-inputs-kafka.html
What does the events look like? What does the mapping for the index look like?
da_Teng
(Da Teng)
August 18, 2016, 7:28am
6
Events is this?
"{"IP":"61.51.69.50","TIMESTAMP":1471505136,"channel":"14396157402322596","code":"000","i":{"cdn_avg_duration":176,"cdn_download_bytes":71607,"cdn_max_duration":302,"current_connections":1,"p2p_avg_duration":56307,"p2p_download_bytes":795705,"p2p_download_useful_bytes":823142,"p2p_max_duration":77662,"played_bytes":877844,"report_interval_time":31},"id":"96a1f1ab05734e4621748d376bd4532b","partner":"CDiHzB3wGEpRshwTtprO","sysinfo":"android_phone","version":"2015122501"}"
And the mapping for the index is this ?
logstash-*
da_Teng
(Da Teng)
August 18, 2016, 7:33am
7
Hi Christian!
Are you received notification?
I suspect this is a bug in the elasticsearch output. The second to last stackframe comes from
sleep_interval = @retry_initial_interval
while submit_actions && submit_actions.length > 0
# We retry with whatever is didn't succeed
begin
submit_actions = submit(submit_actions)
if submit_actions && submit_actions.size > 0
@logger.error("Retrying individual actions")
submit_actions.each {|action| @logger.error("Action", action) }
end
rescue => e
@logger.error("Encountered an unexpected error submitting a bulk request! Will retry.",
:error_message => e.message,
:class => e.class.name,
:backtrace => e.backtrace)
end
# Everything was a success!
break if !submit_actions || submit_actions.empty?
and that line should probably be
submit_actions.each {|action| @logger.error("Action", :action => action) }
instead.
da_Teng
(Da Teng)
August 18, 2016, 9:47am
9
I believe you should be right,but my another machine is good with the same common.rb file.
da_Teng
(Da Teng)
August 18, 2016, 9:59am
10
Hi magnusbaeck!
You nearly right ,but get a new error with it.
Action {:action=>["index", {:_id=>nil, :_index=>"logstash-reporter-access-2016.08.17", :_type=>"logs", :_routing=>nil}, 2016-08-17T11:53:08.000Z %{host} {"IP":"111.122.240.73","TIMESTAMP":1471434788,"channel":"14396157402323411","code":"000","i":{"cdn_avg_duration":341,"cdn_max_duration":360,"current_connections":61,"join":1,"join_t":228777,"p2p_avg_duration":6379,"p2p_max_duration":11345,"report_interval_time":30},"id":"a0e71df3774f3662021af8392773ef7a","partner":"CDiHzB3wGEpRshwTtprO","sysinfo":"android_phone","version":"2015122501"}], :level=>:error}
Can you help me to resolve it:)
This log message just states that a particular action is being retried. Why it's being retried (that is, why it failed the first time) is logged elsewhere.
tcouto
March 14, 2017, 2:18pm
13
Hi, @magnusbaeck . Is this a bug in the ElasticSearch output, and is fixed?