版本: 6.8-7.5
简而言之,当Elasticsearch由于各种原因无法恢复索引时,会出现此错误,例如索引已存在、权限不足或Elasticsearch版本不匹配。要解决此问题,你可以尝试在恢复之前删除现有索引,确保用户具有必要的权限,或检查用于创建快照的Elasticsearch版本是否与你尝试恢复到的版本相匹配。
日志上下文 #
日志 “cannot restore index [” + index + “] because it cannot be " 类名是 RestoreService.java。 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:
request.indexSettings(); request.ignoreIndexSettings());
try {
snapshotIndexMetaData = metaDataIndexUpgradeService.upgradeIndexMetaData(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();





