Cabin::Channel#error(message, data={}) - second argument you gave me wasa Array, I require a Hash

{: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!

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?

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?

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-*

Hi Christian!
Are you received notification?

I suspect this is a bug in the elasticsearch output. The second to last stackframe comes from

and that line should probably be

submit_actions.each {|action| @logger.error("Action", :action => action) }

instead.

I believe you should be right,but my another machine is good with the same common.rb file.

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.

Thanks for your help!

Hi, @magnusbaeck. Is this a bug in the ElasticSearch output, and is fixed?