logstash->es错误

[2018-08-16T23:41:32,721][WARN ][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>"22c6c6e8398049f783fe0862c08f71bb", :_index=>"cms_article", :_type=>"doc", :_routing=>nil}, #], :response=>{"index"=>{"_index"=>"cms_article", "_type"=>"doc", "_id"=>"22c6c6e8398049f783fe0862c08f71bb", "status"=>400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"Rejecting mapping update to [cms_article] as the final mapping would have more than 1 type: [_doc, doc]"}}}}

原因是我自己在创建索引映射的时候的索引类型设置为_doc,但是logstash在同步的时候会自动创建一个doc类型的index,所以引起冲突,,解决方式可以修改自己的索引映射为doc,这样就不会发生冲突了!

你可能感兴趣的:(logstash->es错误)