# Logstash output Elasticsearch - mapper\_parsing\_exception

**URL:** https://discuss.elastic.co/t/logstash-output-elasticsearch-mapper-parsing-exception/226256
**Category:** Logstash
**Created:** [April 2, 2020, 5:10pm UTC](https://discuss.elastic.co/t/logstash-output-elasticsearch-mapper-parsing-exception/226256 "2020-04-02T17:10:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![abrejuin](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@abrejuin](https://discuss.elastic.co/u/abrejuin)
#### Post date: [April 2, 2020, 5:10pm UTC](https://discuss.elastic.co/t/logstash-output-elasticsearch-mapper-parsing-exception/226256/1 "2020-04-02T17:10:22Z")

</div>

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 :

```auto
[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

```auto
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

---

<div class="post-metadata">

### Author: ![abrejuin](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@abrejuin](https://discuss.elastic.co/u/abrejuin)
#### Post date: [April 3, 2020, 9:41am UTC](https://discuss.elastic.co/t/logstash-output-elasticsearch-mapper-parsing-exception/226256/2 "2020-04-03T09:41:04Z")

</div>

Hello,

After updated default\_template.json, it is working now.

> <https://github.com/logstash-plugins/logstash-output-elasticsearch/blob/master/lib/logstash/outputs/elasticsearch/elasticsearch-template-es6x.json>

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 1, 2020, 9:41am UTC](https://discuss.elastic.co/t/logstash-output-elasticsearch-mapper-parsing-exception/226256/3 "2020-05-01T09:41:14Z")

</div>

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