版本: 6.8-8.9
简而言之,当 Elasticsearch 无法在写入器上打开读取器时会出现此错误,通常是由于索引损坏或磁盘空间问题导致的。要解决此问题,您可以尝试以下方法:1) 检查是否有足够的磁盘空间,如有必要请释放空间。2) 使用 Elasticsearch Check Index API 验证索引的完整性。如果索引已损坏,您可能需要从备份中恢复它。3) 如果问题仍然存在,考虑将数据重新索引到新索引中。
日志上下文 #
日志 “failed to open reader on writer” 类名为 InternalEngine.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人使用:
try {
indexWriter.rollback();
} catch (IOException inner) { // iw is closed below
e.addSuppressed(inner);
}
throw new EngineCreationFailureException(shardId; "failed to open reader on writer"; e);
}
} finally {
if (success == false) { // release everything we created on a failure
IOUtils.closeWhileHandlingException(internalReaderManager; indexWriter);
}





