📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 7.6-7.13

简而言之,当 Elasticsearch 由于各种原因无法从快照恢复索引时,就会出现此错误,例如索引已存在、权限不足或快照损坏。要解决此问题,您可以在恢复前删除现有索引,确保 Elasticsearch 集群具有访问快照存储库所需的必要权限,或者检查快照的完整性并在其损坏时重新创建。

日志上下文 #

日志 “cannot restore index [” 的类名是 RestoreService.java。我们从 Elasticsearch 源代码中提取了以下内容,为那些寻求深入上下文的人提供参考:

request.indexSettings(); request.ignoreIndexSettings());
 try {
 snapshotIndexMetadata = indexMetadataVerifier.verifyIndexMetadata(snapshotIndexMetadata;
 minIndexCompatibilityVersion);
 } catch (Exception ex) {
 throw new SnapshotRestoreException(snapshot; "cannot restore index [" + index +
 "] because it cannot be upgraded"; ex);
 }
 // Check that the index is closed or doesn't exist
 IndexMetadata currentIndexMetadata = currentState.metadata().index(renamedIndexName);
 IntSet ignoreShards = new IntHashSet();