# Elastich search:unassigned shards: status yellow

**URL:** https://discuss.elastic.co/t/elastich-search-unassigned-shards-status-yellow/338120
**Category:** Kibana
**Tags:** elastic-stack-monitoring
**Created:** [July 11, 2023, 2:45pm UTC](https://discuss.elastic.co/t/elastich-search-unassigned-shards-status-yellow/338120 "2023-07-11T14:45:38Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Deepika\_Gupta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deepika_gupta/32/123300_2.png) [@Deepika\_Gupta](https://discuss.elastic.co/u/Deepika_Gupta)
#### Post date: [July 11, 2023, 2:45pm UTC](https://discuss.elastic.co/t/elastich-search-unassigned-shards-status-yellow/338120/1 "2023-07-11T14:45:38Z")

</div>

Hello Team,

My team is trying to create an Elasticsearch -cluster with Kibana.  
on one server Elasticsearch node works fine with zero shards.  
But another server is complaining about the status "yellow".  
Below is the unassigned shards ID. Can you please guide us on How to remove/assign/recreate the correct assigned shards?

metricbeat-7.17.10-2023.07.11-000001 0 r UNASSIGNED CLUSTER\_RECOVERED

Regards,  
Deepika

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [July 12, 2023, 11:48pm UTC](https://discuss.elastic.co/t/elastich-search-unassigned-shards-status-yellow/338120/2 "2023-07-12T23:48:40Z")

</div>

This is a replica shard, which can not be allocated on the same Elasticsearch node as the primary shard. If the node with the primary shard goes away, the data will be lost. To make sure that doesn't happen, you could deploy a 2nd instance of Elasticsearch in the cluster. The replica shard will be assigned automatically to the new node. When that happens, the cluster state should be `green`.

---

<div class="post-metadata">

### Author: ![Deepika\_Gupta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deepika_gupta/32/123300_2.png) [@Deepika\_Gupta](https://discuss.elastic.co/u/Deepika_Gupta)
#### Post date: [July 13, 2023, 9:22am UTC](https://discuss.elastic.co/t/elastich-search-unassigned-shards-status-yellow/338120/3 "2023-07-13T09:22:22Z")

</div>

Hello Tim,

Thanks for your quick reply and for considering my request!

We have three nodes, one is dedicated to Kibana, and two other nodes for ELK, one is master and the other is a slave.  
the first node is working fine with the status "Green"  
The second node is complaining about the status "Yellow"  
and we have to make it work with these three nodes only for now.  
so we cant create a new node for elk.  
how we can do it with this only?

Regards,  
Deepika

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [July 13, 2023, 6:08pm UTC](https://discuss.elastic.co/t/elastich-search-unassigned-shards-status-yellow/338120/4 "2023-07-13T18:08:45Z")

</div>

I think I understand now. You have two Elasticsearch nodes that are not joined together in a cluster. One node has no shards and it's cluster state is green. Another node needs to assign shards so it's cluster state is yellow.

See: [https://www.elastic.co/guide/en/elasticsearch/reference/7.17/add-elasticsearch-nodes.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/add-elasticsearch-nodes.html)

---

<div class="post-metadata">

### Author: ![Deepika\_Gupta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deepika_gupta/32/123300_2.png) [@Deepika\_Gupta](https://discuss.elastic.co/u/Deepika_Gupta)
#### Post date: [July 14, 2023, 8:24am UTC](https://discuss.elastic.co/t/elastich-search-unassigned-shards-status-yellow/338120/5 "2023-07-14T08:24:50Z")

</div>

Thanks once again for your prompt reply.

somehow we made both nodes green(the yellow node is showing green because we stopped metric beats services).

**Elk stack version:** 7.17

**First Scenario:**  
when we are assigning cluster nodes of Elasticsearch in Kibana: Kibana is throwing the **error**  **"504 Gateway time out"**

**Second scenario:**  
With Individual node: **Kibana works fine** \* (\*\*Page is loading on the browser with Elasticsearch).

Could you please guide us why with two nodes, getting "504 Gateway time out?

Please refer error below for more reference.

"type":"log","@timestamp":"2023-07-14T10:08:53+02:00","tags":["info","savedobjects-service"],"pid":21832,"message":"Starting saved objects migrations"}  
{"type":"log","@timestamp":"2023-07-14T10:08:53+02:00","tags":["info","savedobjects-service"],"pid":21832,"message":"[.kibana\_task\_manager] INIT -\> OUTDATED\_DOCUMENTS\_SEARCH\_OPEN\_PIT. took: 6ms."}  
{"type":"log","@timestamp":"2023-07-14T10:08:53+02:00","tags":["info","savedobjects-service"],"pid":21832,"message":"[.kibana] INIT -\> OUTDATED\_DOCUMENTS\_SEARCH\_OPEN\_PIT. took: 15ms."}  
{"type":"log","@timestamp":"2023-07-14T10:08:53+02:00","tags":["info","savedobjects-service"],"pid":21832,"message":"[.kibana] OUTDATED\_DOCUMENTS\_SEARCH\_OPEN\_PIT -\> OUTDATED\_DOCUMENTS\_SEARCH\_READ. took: 4ms."}  
{"type":"log","@timestamp":"2023-07-14T10:08:53+02:00","tags":["info","savedobjects-service"],"pid":21832,"message":"[.kibana\_task\_manager] OUTDATED\_DOCUMENTS\_SEARCH\_OPEN\_PIT -\> OUTDATED\_DOCUMENTS\_SEARCH\_READ. took: 13ms."}  
{"type":"log","@timestamp":"2023-07-14T10:08:53+02:00","tags":["error","savedobjects-service"],"pid":21832,"message":"[.kibana\_task\_manager] Unexpected Elasticsearch ResponseError: statusCode: 404, method: POST, url: /\_search?allow\_partial\_search\_results=false error: [index\_not\_found\_exception]: no such index [.kibana\_task\_manager\_7.17.10\_001],"}  
{"type":"log","@timestamp":"2023-07-14T10:08:53+02:00","tags":["fatal","root"],"pid":21832,"message":"Error: Unable to complete saved object migrations for the [.kibana\_task\_manager] index. Please check the health of your Elasticsearch cluster and try again. Unexpected Elasticsearch ResponseError: statusCode: 404, method: POST, url: /\_search?allow\_partial\_search\_results=false error: [index\_not\_found\_exception]: no such index [.kibana\_task\_manager\_7.17.10\_001],\n at migrationStateActionMachine (/usr/share/kibana/src/core/server/saved\_objects/migrationsv2/migrations\_state\_action\_machine.js:164:13)\n at processTicksAndRejections (node:internal/process/task\_queues:96:5)\n at async Promise.all (index 1)\n at SavedObjectsService.start (/usr/share/kibana/src/core/server/saved\_objects/saved\_objects\_service.js:181:9)\n at Server.start (/usr/share/kibana/src/core/server/server.js:330:31)\n at Root.start (/usr/share/kibana/src/core/server/root/index.js:69:14)\n at bootstrap (/usr/share/kibana/src/core/server/bootstrap.js:120:5)\n at Command. (/usr/share/kibana/src/cli/serve/serve.js:229:5)"}  
{"type":"log","@timestamp":"2023-07-14T10:08:53+02:00","tags":["info","plugins-system","standard"],"pid":21832,"message":"Stopping all plugins."}  
{"type":"log","@timestamp":"2023-07-14T10:08:53+02:00","tags":["info","plugins","monitoring","monitoring","kibana-monitoring"],"pid":21832,"message":"Monitoring stats collection is stopped"}  
{"type":"log","@timestamp":"2023-07-14T10:08:53+02:00","tags":["error","savedobjects-service"],"pid":21832,"message":"[.kibana] Unexpected Elasticsearch ResponseError: statusCode: 404, method: POST, url: /\_search?allow\_partial\_search\_results=false error: [index\_not\_found\_exception]: no such index [.kibana\_7.17.10\_001],"}

Regards,  
Deepika

---

<div class="post-metadata">

### Author: ![Deepika\_Gupta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deepika_gupta/32/123300_2.png) [@Deepika\_Gupta](https://discuss.elastic.co/u/Deepika_Gupta)
#### Post date: [July 14, 2023, 12:58pm UTC](https://discuss.elastic.co/t/elastich-search-unassigned-shards-status-yellow/338120/6 "2023-07-14T12:58:38Z")

</div>

Thanks for your help/support.

ELk started working now after deleting logs from `/var/lib/elasticsearch`(all index files)

Regard,  
Deepika

---

<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: [August 11, 2023, 12:59pm UTC](https://discuss.elastic.co/t/elastich-search-unassigned-shards-status-yellow/338120/7 "2023-08-11T12:59:21Z")

</div>

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