# Filebeat incompatibility when upgrading elasticsearch

**URL:** https://discuss.elastic.co/t/filebeat-incompatibility-when-upgrading-elasticsearch/290607
**Category:** Elasticsearch
**Created:** [November 30, 2021, 9:57pm UTC](https://discuss.elastic.co/t/filebeat-incompatibility-when-upgrading-elasticsearch/290607 "2021-11-30T21:57:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bruce289](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@bruce289](https://discuss.elastic.co/u/bruce289)
#### Post date: [November 30, 2021, 9:57pm UTC](https://discuss.elastic.co/t/filebeat-incompatibility-when-upgrading-elasticsearch/290607/1 "2021-11-30T21:57:13Z")

</div>

Hi.

We're currently testing an upgrade from Elasticsearch 6.8 to 7.15 and we noticed that when we upgrade the cluster, the Filebeat agents on some of our hosts can no longer write to the indices and we see the errors like the following in the Filebeat logs:

```auto
Rejecting mapping update to [testindex-2020.11.30] as the final mapping would have more than 1 type: [doc, _doc]

```

It seems that if Filebeat has been restarted after the cluster has been upgraded or if this is a newly built host, Filebeat detects that the cluster is now v7 and starts indexing events with a document type of `_doc`, whereas on hosts where Filebeat hasn't restarted, it still thinks that the cluster is v6 and still indexes events with a document type of `doc`.

I must be overlooking something here but I can't figure out how we're going to do this other than to restart filebeat at midnight on all our hosts after the upgrade is completed, but even that isn't that easy at our scale. Would really appreciate some ideas here. Thanks.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 30, 2021, 10:14pm UTC](https://discuss.elastic.co/t/filebeat-incompatibility-when-upgrading-elasticsearch/290607/2 "2021-11-30T22:14:27Z")

</div>

Yeah that's a bit of a hassle, as we changed to `doc`, only to settle on `_doc` ☹

It might be worth upgrading all your Filebeat instances first, then Elasticsearch next. What sort of scale are you working at?

---

<div class="post-metadata">

### Author: ![bruce289](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@bruce289](https://discuss.elastic.co/u/bruce289)
#### Post date: [December 1, 2021, 8:28am UTC](https://discuss.elastic.co/t/filebeat-incompatibility-when-upgrading-elasticsearch/290607/3 "2021-12-01T08:28:38Z")

</div>

Thanks for the reply, Mark. Though I can't see how that would help us. Filebeat 7 will still automatically detect the version of the cluster and adjust the document type accordingly.

---

<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: [December 29, 2021, 8:28am UTC](https://discuss.elastic.co/t/filebeat-incompatibility-when-upgrading-elasticsearch/290607/4 "2021-12-29T08:28:59Z")

</div>

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