簡體   English   中英

恢復快照失敗-在Elasticsearch中找不到IndexShardRestoreFailedException文件

[英]Failed to restore snapshot - IndexShardRestoreFailedException file not found in elasticsearch

我正在使用帶有Elasticsearch 1.3.1的3節點群集設置,我有17個索引,每個索引都有最小0.5 M(1Gi)文檔和最大1.4 M(3 Gi)。 現在,我想在群集中嘗試快照和還原過程。 我使用以下REST調用執行相同的操作...

要創建存儲庫:

curl -XPUT 'http://host.name:9200/_snapshot/es_snapshot_repo' -d '{ 
    "type": "fs", 
    "settings": { 
        "location": "/data/es_snapshot_bkup_repo/es_snapshot_repo" 
    } 
}' 

驗證存儲庫:

curl -XGET 'http://host.name:9200/_snapshot/es_snapshot_repo?pretty' the response is 
{ 
  "es_snapshot_repo" : { 
    "type" : "fs", 
    "settings" : { 
      "location" : "/data/es_snapshot_bkup_repo/es_snapshot_repo" 
    } 
  } 
} 

使用完成了SNAPSHOT

curl -XPUT "http://host.name:9200/_snapshot/es_snapshot_repo/snap_001" -d '{
  "indices": "index_01",
  "ignore_unavailable": "true",
  "include_global_state": false,
  "wait_for_completion": true
}'

響應是

{
  "accepted": true
} 

然后我正在嘗試通過請求還原快照

curl -XPOST "http://host.name:9200/_snapshot/es_snapshot_repo/snap_001/_restore" -d '{
  "indices": "index_01",
  "ignore_unavailable": "true",
  "include_global_state": false,
  "rename_pattern": "index_01",
  "rename_replacement": "index_01_bk",
  "include_aliases": false
}'

問題:據我所知,我有3個節點。 我要進行快照和還原的索引有6個分片和2個副本。

大多數分片及其副本已正確還原,但有時1個,有時2個主分片及其副本無法恢復。 這些主要分片處於INITIALIZING狀態。 我允許群集將它們重新放置一個多小時,但碎片無法重新放置到正確的節點上……我的節點中出現以下異常。

還原過程試圖將分片放置在其他2個節點中...但這是不可能的...

[2014-08-27 07:10:35,492][DEBUG][cluster.service          ] [node_01] processing [
  shard-failed (
    [snap_001][4], 
    node[r4UoA7vJREmQfh6lz634NA], 
    [P],
    restoring[es_snapshot_repo:snap_001],
    s[INITIALIZING]),
    reason [Failed to start shard, 
    message [IndexShardGatewayRecoveryException[[snap_001][4] failed recovery]; 
  nested: IndexShardRestoreFailedException[[snap_001][4] restore failed]; 
  nested: IndexShardRestoreFailedException[[snap_001][4] failed to restore snapshot [snap_001]]; 
  nested: IndexShardRestoreFailedException[[snap_001][4] failed to read shard snapshot file]; 
  nested: FileNotFoundException[/data/es_snapshot_bkup_repo/es_snapshot_repo/indices/index_01/4/snapshot-snap_001 (No such file or directory)]; ]]]: 
done applying updated cluster_state (version: 56391) 

任何人都可以幫助我克服這個問題,如果我在這些過程中犯了任何錯誤,請糾正我。

僅供參考,我正在使用主節點來傳遞curl請求

我們需要提供一個共享文件系統位置,所有具有read & write許可權的elasticsearch節點都應訪問該位置。

暫無
暫無

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

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