簡體   English   中英

Elasticsearch集群運行狀況間歇性地在“ GREEN”和“ YELLOW”之間波動

[英]Elasticsearch cluster health intermittently flaps between 'GREEN' and 'YELLOW'

我們正在運行具有“零”副本的7節點集群,如下所示:

{
"cluster_name": "my_cluster",
"status": "green",
"timed_out": false,
"number_of_nodes": 7,
"number_of_data_nodes": 7,
"active_primary_shards": 3325,
"active_shards": 3325,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 0,
"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": 100.0
}

elasticsearch群集狀態會間歇性地從“綠色”變為“黃色”。 我注意到的另一件有趣的事情是,在此間歇性群集狀態更改期間,發生了分片初始化,這與群集狀態更改相關。 這是由於群集運行“零”副本嗎? 什么會導致上述行為?

1.找到索引

http://IP_MASTER:9200/_cat/indices?v 

2.找到具有該索引分片的節點將要分配和取消分配。

http://IP_MASTER:9200/_cat/shards?v
  1. 在該節點上重新啟動服務elasticsearch
  2. 如果存在問題,則有兩種選擇。

A. lucene檢查索引(僅檢查該碎片)

java -cp lucene-core*.jar -ea:org.apache.lucene… org.apache.lucene.index.CheckIndex /mnt/nas/elasticsearch/graylog-production/nodes/0/indices/graylog_92/0/index/ -verbose -exorcise

如果提示找不到該段,請嘗試在該路徑上查找並執行cd,然后運行命令。

B. elasticsearch修復索引(它檢查所有索引並且非常慢)

index.shard.check_on_startup: fix

您應該在該節點的elasticsearch.yml上設置此配置。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM