Elasticsearch "status" : "yellow" How to fix the status?

#curl kibana:kibana@172.17.0.1:9200/_cluster/health?pretty=true
{
  "cluster_name" : "xxxxx-cluster",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 2,
  "number_of_data_nodes" : 2,
  "active_primary_shards" : 185,
 "active_shards" : 185,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 185,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 50.0
#curl -sS -XGET kibana:kibana@172.17.0.1:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason | grep UNASSIGNED
cdr-a-2020-02-xxxxxxxx         0 r UNASSIGNED CLUSTER_RECOVERED
cdr-b-2022-07-xxxxxxxx         0 r UNASSIGNED CLUSTER_RECOVERED
accounts-2021-12-172.16.23.201 0 r UNASSIGNED CLUSTER_RECOVERED
cdr-a-2019-11-xxxxxxxx         0 r UNASSIGNED CLUSTER_RECOVERED
cdr-a-2019-11-                 0 r UNASSIGNED CLUSTER_RECOVERED
accounts-2020-10-xxxxxxxx      0 r UNASSIGNED CLUSTER_RECOVERED
cdr-a-2019-12-                 0 r UNASSIGNED CLUSTER_RECOVERED
cdr-a-2022-04-                 0 r UNASSIGNED CLUSTER_RECOVERED
cdr-b-2021-05-xxxxxxxx         0 r UNASSIGNED CLUSTER_RECOVERED
#curl -sS -XGET kibana:kibana@172.17.0.1:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason | awk '/UNASSIGNED/ { print $1 }'
cdr-a-2021-03-
cdr-b-2021-03-xxxxxxx
cdr-a-2020-07-
accounts-2022-07-172.16.23.201
cdr-a-2021-07-xxxxxxxx
cdr-a-2021-12-xxxxxxxx
cdr-b-2020-12-xxxxxxxx 

Welcome!

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

Please run the recovery API and paste the report here:

GET /_cat/recovery?v
index                          shard time  type           stage source_host source_node target_host target_node    repository snapshot files files_recovered files_percent files_total bytes bytes_recovered bytes_percent bytes_total translog_ops translog_ops_recovered translog_ops_percent
cdr-a-2021-08-                 0     2.2s  existing_store done  n/a         n/a         172.19.0.3  elasticsearch2 n/a        n/a      0     0               100.0%        38          0     0               100.0%        14835897    0            0                      100.0%
cdr-b-2019-12-xxxxxxx        0     4.5s  existing_store done  n/a         n/a         172.19.0.2  elasticsearch  n/a        n/a      0     0               100.0%        57          0     0               100.0%        46647225    0            0                      100.0%
...............
curl kibana:kibana@172.19.0.3:9200/_cat/health
1665609578 21:19:38 xxxxx-cluster yellow 2 2 185 185 0 0 185 0 - 50.0%
curl kibana:kibana@172.17.0.1:9200/_cat/health
1665609688 21:21:28 xxxxx-cluster yellow 2 2 185 185 0 0 185 0 - 50.0%
@172.19.0.2:9200/_cat/health
1665609878 21:24:38 xxxxx-cluster yellow 2 2 185 185 0 0 185 0 - 50.0%

Hi.

I do not work for Elastic, im just another guy using Elastic-Stack.

1.) Try to open dev tools in kibana.
1.a) Use the command: GET /_cat/shards?v=true&h=index,shared,prirep,state,docs,store,node&s=state

After the command is used is all indices in the state "STARTED"? if not could be the reason, it happened to me.

2.) 2 nodes? i think you will need either 1,3,5,7 and so on, to prevent split-brain (prevent 2 cluster because both think they are master node)

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