logstash->es错误

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/xin17865195971/article/details/81750835
[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}, #<LogStash::Event:0x38df802a>], :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,这样就不会发生冲突了!

展开阅读全文

没有更多推荐了,返回首页