# Elastic Cloud showing "Unhealthy" but all zones are "Healthy"

**URL:** <https://discuss.elastic.co/t/elastic-cloud-showing-unhealthy-but-all-zones-are-healthy/327482>\
**Category:** Elasticsearch\
**Created:** [March 11, 2023, 3:13am UTC](https://discuss.elastic.co/t/elastic-cloud-showing-unhealthy-but-all-zones-are-healthy/327482 "2023-03-11T03:13:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![matto](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@matto](https://discuss.elastic.co/u/matto)\
**Post date:** [March 11, 2023, 3:13am UTC](https://discuss.elastic.co/t/elastic-cloud-showing-unhealthy-but-all-zones-are-healthy/327482/1 "2023-03-11T03:13:53Z")

</div>

We are running Magneto 2.4 using Elastic hosted on [Elastic.co](http://Elastic.co).

Elastic Cloud version 7.17 due to Magento 2.4 requirements.

Recently our Elastic Cloud is showing "Unhealthy" but all zones are "Healthy" - screenshot attached.

Magento 2 logs are showing the occasional error, one every day or two:

`[2023-03-10 09:26:05] main.ERROR: Bulk index operation failed 1 times in index magento2_default_tracking_log_session_20220507 for type _doc. Error (unavailable_shards_exception) : [magento2_default_tracking_log_session_20220507][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[magento2_default_tracking_log_session_20220507][0]] containing [index {[magento2_default_tracking_log_session_20220507][_doc][null], source[{"session_id":"null","category_view":[9,32],"visitor_id":["null"],"product_view":[7,481,125,359,363,31,38,48,144,163,197,213,254,260,316],"end_date":"2023-03-10 09:24:44","start_date":"2022-05-07 08:27:25","store_id":1}]}]]. Failed doc ids sample : null. [] []`

Can anyone assist with the cause of this error and how it can be resolved? The Health tab in the Elastic Cloud doesn't show any details.

Thank you

 ![elastic_error](https://us1.discourse-cdn.com/elastic/original/3X/f/d/fd7006076b349a6027f000c8f491db09cbacd24e.jpeg)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 11, 2023, 4:46am UTC](https://discuss.elastic.co/t/elastic-cloud-showing-unhealthy-but-all-zones-are-healthy/327482/2 "2023-03-11T04:46:32Z")

</div>

Hi @matto

You can open a support ticket...

Also what does it say when you click on View Issues

 ![Screenshot_20230310-204506](https://us1.discourse-cdn.com/elastic/original/3X/d/e/de05733a0ba45af41f378c362f94baf881dca341.png)

---

<div class="post-metadata">

**Author:** ![matto](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@matto](https://discuss.elastic.co/u/matto)\
**Post date:** [March 11, 2023, 5:08am UTC](https://discuss.elastic.co/t/elastic-cloud-showing-unhealthy-but-all-zones-are-healthy/327482/3 "2023-03-11T05:08:26Z")

</div>

Hey Stephen,

Thanks for your reply. Nothing is shown in the "View Issues" tab, please see a screenshot below.

I have just opened a support ticket but if you have any advice please let me know.

 ![view_issues](https://us1.discourse-cdn.com/elastic/original/3X/5/6/5677313a4d67c7d3b20fdf3e567764e85d791476.jpeg)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 11, 2023, 5:24am UTC](https://discuss.elastic.co/t/elastic-cloud-showing-unhealthy-but-all-zones-are-healthy/327482/4 "2023-03-11T05:24:42Z")

</div>

Looks like you are missing some primary shards... There are various reasons for this...

Perhaps look at this

> **[Why are my shards unavailable? | Elasticsearch Service Documentation | Elastic](https://www.elastic.co/guide/en/cloud/current/ec-scenario_why_are_shards_unavailable.html)**

---

<div class="post-metadata">

**Author:** ![matto](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@matto](https://discuss.elastic.co/u/matto)\
**Post date:** [March 12, 2023, 2:16am UTC](https://discuss.elastic.co/t/elastic-cloud-showing-unhealthy-but-all-zones-are-healthy/327482/5 "2023-03-12T02:16:37Z")

</div>

> [@matto](#):
>
> primary shard is not active Timeout: [1m]

Thanks Stephen, I have read through that document.

To my understanding the first step may be to resolve the "primary shard is not active Timeout: [1m]" error?

Are you able to point me in the right direction, does this sound like an issue with our Elastic Cloud setup, or Magento setup?

The setup has been working for 12+ months without issue and this started around 2 weeks ago. We're hosting Magento on an AWS EC2 using an AWS RDS database.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 12, 2023, 3:02am UTC](https://discuss.elastic.co/t/elastic-cloud-showing-unhealthy-but-all-zones-are-healthy/327482/6 "2023-03-12T03:02:57Z")

</div>

Hi @matto

You should run the commands on this page the documents are pretty clear on how to analyze and bring us back the results.

> **[Analyze unassigned shards using the Elasticsearch API | Elasticsearch Service...](https://www.elastic.co/guide/en/cloud/current/ec-analyze_shards_with-api.html)**

Especially the explain... That That is how you're going to figure this out why your primary shard is missing.

Run those commands and bring back the results...

I cannot say for sure, but I suspect this is not an elastic cloud issue. You're nodes are green and there's plenty of room on the nodes from what I can see.

Also you should open a support ticket.

---

<div class="post-metadata">

**Author:** ![matto](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@matto](https://discuss.elastic.co/u/matto)\
**Post date:** [March 12, 2023, 3:28am UTC](https://discuss.elastic.co/t/elastic-cloud-showing-unhealthy-but-all-zones-are-healthy/327482/7 "2023-03-12T03:28:27Z")

</div>

Hi Stephen,

I have run those commands, please see the attached files.

[https://www.dropbox.com/s/8loqe46ol336885/api\_output.jpg?dl=0](https://www.dropbox.com/s/8loqe46ol336885/api_output.jpg?dl=0)  
[https://www.dropbox.com/s/3fdxmmioxmij089/\_cat\_indices%3Fv%26health%3Dred.txt?dl=0](https://www.dropbox.com/s/3fdxmmioxmij089/_cat_indices%3Fv%26health%3Dred.txt?dl=0)  
[https://www.dropbox.com/s/vb2j4gc2n6d38xo/_cat\_shards_%3Fv.txt?dl=0](https://www.dropbox.com/s/vb2j4gc2n6d38xo/_cat_shards_%3Fv.txt?dl=0)  
[https://www.dropbox.com/s/2vfpdn6snqq085a/\_cluster\_allocation\_explain.txt?dl=0](https://www.dropbox.com/s/2vfpdn6snqq085a/_cluster_allocation_explain.txt?dl=0)

Does this help to explain what the cause of the issue may be?

I have opened a support ticket yesterday and awaiting a response.

Thank you

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 12, 2023, 4:20am UTC](https://discuss.elastic.co/t/elastic-cloud-showing-unhealthy-but-all-zones-are-healthy/327482/8 "2023-03-12T04:20:18Z")

</div>

You need support you have many red indices and many unassigned shards...

I see "node left" so perhaps this is a Node Issue..

This is definitely not good...

"allocate\_explanation": "cannot allocate because a previous copy of the primary shard existed but can no longer be found on the nodes in the cluster",

Do you have snapshots?

Support will be your best bet did you open a Sev 1 ... You should

I would also going into Snapshot Lifecycle Management.... And make sure you are keeping snapshots as you may need to restore

Also it looks like that you have set many your indices to 0 replicas which means that you are risk of data loss. If your data is important you should always have a replica... That is the best practice.

---

<div class="post-metadata">

**Author:** ![matto](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@matto](https://discuss.elastic.co/u/matto)\
**Post date:** [March 13, 2023, 1:26pm UTC](https://discuss.elastic.co/t/elastic-cloud-showing-unhealthy-but-all-zones-are-healthy/327482/9 "2023-03-13T13:26:00Z")

</div>

Hi Stephen,

Thank you for your support. I opened a ticket and the Elastic support were very helpful, and directed me on how to close the red indicies and then restore these from the latest backup.

The cluster looks to be healthy again.

---

<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:** [April 10, 2023, 1:26pm UTC](https://discuss.elastic.co/t/elastic-cloud-showing-unhealthy-but-all-zones-are-healthy/327482/10 "2023-04-10T13:26:12Z")

</div>

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