# Elasticsearch upgrade

**URL:** <https://discuss.elastic.co/t/elasticsearch-upgrade/332805>\
**Category:** Elasticsearch\
**Created:** [May 8, 2023, 10:39am UTC](https://discuss.elastic.co/t/elasticsearch-upgrade/332805 "2023-05-08T10:39:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krzysztof\_Dabrowski](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krzysztof_dabrowski/32/120747_2.png) [@Krzysztof\_Dabrowski](https://discuss.elastic.co/u/Krzysztof_Dabrowski)\
**Post date:** [May 8, 2023, 10:39am UTC](https://discuss.elastic.co/t/elasticsearch-upgrade/332805/1 "2023-05-08T10:39:31Z")

</div>

Hey. I wanted to upgrade elasticsearch from 7.16 to 8.7. First I upgraded ES to 7.17 but I didn't restarted the service and immediately upgraded to 8.7. Now Elasticsearch wont start due to error:  
cannot upgrade a node from version [7.16.2] directly to version [8.7.1], upgrade to version [7.17.0] first.

I have backed up configuration directory, /etc/elasticsearch and data directory where we store indices.

What is the best way to solve this issue? Thanks.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 8, 2023, 11:19am UTC](https://discuss.elastic.co/t/elasticsearch-upgrade/332805/2 "2023-05-08T11:19:56Z")

</div>

I think the error message is explicit. You must first upgrade to 7.17 latest.

---

<div class="post-metadata">

**Author:** ![Krzysztof\_Dabrowski](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krzysztof_dabrowski/32/120747_2.png) [@Krzysztof\_Dabrowski](https://discuss.elastic.co/u/Krzysztof_Dabrowski)\
**Post date:** [May 8, 2023, 11:21am UTC](https://discuss.elastic.co/t/elasticsearch-upgrade/332805/3 "2023-05-08T11:21:18Z")

</div>

But I already upgraded to 8.7 without restarting the service when I upgraded to 7.17 and now "it thinks I upgraded directly from 7.16 to 8.7"

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 8, 2023, 11:29am UTC](https://discuss.elastic.co/t/elasticsearch-upgrade/332805/4 "2023-05-08T11:29:41Z")

</div>

When you have upgraded to 7.17 you must restart the service and run the migration assistant in order to identify any issues you need to fix before upgrading further. As far as I recall this is described in the documentation.

---

<div class="post-metadata">

**Author:** ![Krzysztof\_Dabrowski](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krzysztof_dabrowski/32/120747_2.png) [@Krzysztof\_Dabrowski](https://discuss.elastic.co/u/Krzysztof_Dabrowski)\
**Post date:** [May 8, 2023, 11:44am UTC](https://discuss.elastic.co/t/elasticsearch-upgrade/332805/5 "2023-05-08T11:44:10Z")

</div>

Yeah, now I'm aware of it. So the only way to fix is to reinstall ES?

---

<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:** [June 5, 2023, 11:44am UTC](https://discuss.elastic.co/t/elasticsearch-upgrade/332805/6 "2023-06-05T11:44:22Z")

</div>

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