Logstash output Elasticsearch - mapper_parsing_exception

Hello,

I upgraded Elastic from 5.3 to 6.0, I also upgraded Logstash from 5.6 to 6.8.
Since then I have error messages on Logstash while trying to send logs to Elastic :

[WARN ] 2020-04-02 15:01:03.754 [[main]>worker0] elasticsearch - Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"idx-rcu-prod-2020.04.02", :_type=>"doc", :routing=>nil}, #<LogStash::Event:0x6d8bdd7e>], :response=>{"index"=>{"_index"=>"idx-rcu-prod-2020.04.02", "_type"=>"doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"Failed to parse mapping [_default_]: No handler for type [string] declared on field [@version]", "caused_by"=>{"type"=>"mapper_parsing_exception", "reason"=>"No handler for type [string] declared on field [@version]"}}}}}

I thought my error coming from my "default-template.json" but I also tried to debug Logstah using only this information below to send logs to Elastic and I have same errors

output {
        elasticsearch {
                hosts => [ "172.14.0.36:9200" ]
                index => "idx-%{[fields][meta_app]}-%{[fields][meta_env]}-%{+YYYY.MM.dd}"
}

thanks a lot for your help
Best regards

Hello,

After updated default_template.json, it is working now.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.