2017-06-06 33 views
0

システムが故障した後、ディスクがいっぱいになったため、赤色のインデックスがいくつかあります。 しかし、私は失われたシャードを再割り当てすることはできません。それは私が基本的にrerouteコマンド(ドキュメントhere)のすべてのオプションを試してみましたelasticsearch - 利用可能なシャードのコピーはありませんか?

curl -XGET 'localhost:9200/_cluster/allocation/explain?pretty' 
{ 
    "shard" : { 
    "index" : "my_index", 
    "index_uuid" : "iNY9t81wQf6wJc-KqufUrg", 
    "id" : 0, 
    "primary" : true 
    }, 
    "assigned" : false, 
    "shard_state_fetch_pending" : false, 
    "unassigned_info" : { 
    "reason" : "ALLOCATION_FAILED", 
    "at" : "2017-05-30T07:33:04.192Z", 
    "failed_attempts" : 5, 
    "delayed" : false, 
    "details" : "failed to create shard, failure FileSystemException[/data/es/storage/nodes/0/indices/iNY9t81wQf6wJc-KqufUrg/0/_state/state-13.st.tmp: Read-only file system]", 
    "allocation_status" : "deciders_no" 
    }, 
    "allocation_delay_in_millis" : 60000, 
    "remaining_delay_in_millis" : 0, 
    "nodes" : { 
    "KvOd2vSQTOSgjgqyEnOKpA" : { 
     "node_name" : "node1", 
     "node_attributes" : { }, 
     "store" : { 
     "shard_copy" : "NONE" 
     }, 
     "final_decision" : "NO", 
     "final_explanation" : "there is no copy of the shard available", 
     "weight" : -3.683333, 
     "decisions" : [ 
     { 
      "decider" : "max_retry", 
      "decision" : "NO", 
      "explanation" : "shard has already failed allocating [5] times vs. [5] retries allowed unassigned_info[[reason=ALLOCATION_FAILED], at[2017-05-30T07:33:04.192Z], failed_attempts[5], delayed=false, details[failed to create shard, failure FileSystemException[/data/es/storage/nodes/0/indices/iNY9t81wQf6wJc-KqufUrg/0/_state/state-13.st.tmp: Read-only file system]], allocation_status[deciders_no]] - manually call [/_cluster/reroute?retry_failed=true] to retry" 
     } 
     ] 
    }, 
    "pC9fL41xRgeZDAEYvNR1eQ" : { 
     "node_name" : "node2", 
     "node_attributes" : { }, 
     "store" : { 
     "shard_copy" : "AVAILABLE" 
     }, 
     "final_decision" : "NO", 
     "final_explanation" : "the shard cannot be assigned because one or more allocation decider returns a 'NO' decision", 
     "weight" : -2.333333, 
     "decisions" : [ 
     { 
      "decider" : "max_retry", 
      "decision" : "NO", 
      "explanation" : "shard has already failed allocating [5] times vs. [5] retries allowed unassigned_info[[reason=ALLOCATION_FAILED], at[2017-05-30T07:33:04.192Z], failed_attempts[5], delayed=false, details[failed to create shard, failure FileSystemException[/data/es/storage/nodes/0/indices/iNY9t81wQf6wJc-KqufUrg/0/_state/state-13.st.tmp: Read-only file system]], allocation_status[deciders_no]] - manually call [/_cluster/reroute?retry_failed=true] to retry" 
     } 
     ] 
    }, 
    "1g7eCfEQS9u868lFSoo7FQ" : { 
     "node_name" : "node3", 
     "node_attributes" : { }, 
     "store" : { 
     "shard_copy" : "AVAILABLE" 
     }, 
     "final_decision" : "NO", 
     "final_explanation" : "the shard cannot be assigned because one or more allocation decider returns a 'NO' decision", 
     "weight" : 40.866665, 
     "decisions" : [ 
     { 
      "decider" : "max_retry", 
      "decision" : "NO", 
      "explanation" : "shard has already failed allocating [5] times vs. [5] retries allowed unassigned_info[[reason=ALLOCATION_FAILED], at[2017-05-30T07:33:04.192Z], failed_attempts[5], delayed=false, details[failed to create shard, failure FileSystemException[/data/es/storage/nodes/0/indices/iNY9t81wQf6wJc-KqufUrg/0/_state/state-13.st.tmp: Read-only file system]], allocation_status[deciders_no]] - manually call [/_cluster/reroute?retry_failed=true] to retry" 
     } 
     ] 
    } 
    } 
} 

「利用可能シャードのないコピーが存在しない」と言います。しかし、それはこのように私に400エラー..を与える:

curl -XPOST 'localhost:9200/_cluster/reroute?pretty' -H 'Content-Type: application/json' -d' 
{ 
    "commands" : [ 

     { 
      "allocate_replica" : { 
       "index" : "myindex", "shard" : 0, 
       "node" : "node2" 
      } 
     } 
    ] 
}' 

応答:

{ 
    "error" : { 
    "root_cause" : [ 
     { 
     "type" : "illegal_argument_exception", 
     "reason" : "[allocate_replica] trying to allocate a replica shard [myindex][0], while corresponding primary shard is still unassigned" 
     } 
    ], 
    "type" : "illegal_argument_exception", 
    "reason" : "[allocate_replica] trying to allocate a replica shard [myindex][0], while corresponding primary shard is still unassigned" 
    }, 
    "status" : 400 
} 

答えて

0

これを試してみてください。

カール-XPOST 'xx.xxx.xx:9200/_cluster /再ルーティング' -d '{"commands":{{"allocate_stale_primary":{"index": "myindex"、 "shard":0、 "node": "node2"、 "accept_data_loss":true}}}}'

関連する問題