版本: 6.8-8.9
简而言之,当 Elasticsearch 由于损坏、文件丢失或配置错误等问题无法验证索引时,会出现此错误。要解决此问题,您可以尝试以下方法:1) 查看 Elasticsearch 日志以获取更详细的错误信息。2) 验证索引设置和映射是否正确。3) 如果索引损坏,考虑从备份恢复。4) 如果文件丢失,确保 Elasticsearch 数据目录配置正确且可访问。5) 如果所有方法都失败,您可能需要重新创建索引。
日志上下文 #
日志 “Failed to verify index” 的类名是 MetadataIndexStateService.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入了解上下文的人参考:
// version; so we need to verify its compatibility.
newIndexMetadata = indexMetadataVerifier.verifyIndexMetadata(newIndexMetadata; minIndexCompatibilityVersion);
try {
indicesService.verifyIndexMetadata(newIndexMetadata; newIndexMetadata);
} catch (Exception e) {
throw new ElasticsearchException("Failed to verify index " + index; e);
}
metadata.put(newIndexMetadata; true);
} // Always removes index closed blocks (note: this can fail on-going close index actions)





