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

版本: 6.8-8.9

简而言之,当 Elasticsearch 无法定位事务日志(translog)文件时会出现此错误。这些文件对于数据恢复和实时操作至关重要。该错误可能是由于意外删除、损坏或配置错误导致的。要解决此问题,如果有可用备份,可以从最近的备份中恢复。如果没有,可以尝试重新创建索引,但这会导致数据丢失。此外,请确保 Elasticsearch 配置中指定的事务日志文件路径正确且可访问。最后,检查可能导致此问题的任何硬件或文件系统问题。

日志上下文 #

日志 “failed to find existing translog files” 的类名是 TruncateTranslogAction.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入了解上下文的人参考:

// Hold the lock open for the duration of the tool running
 SettranslogFiles;
 try {
 translogFiles = filesInDirectory(translogPath);
 } catch (IOException e) {
 throw new ElasticsearchException("failed to find existing translog files"; e);
 }
 final String details = deletingFilesDetails(translogPath; translogFiles);  return Tuple.tuple(RemoveCorruptedShardDataCommand.CleanStatus.CORRUPTED; details);
 }