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

版本: 6.8-8.9

简而言之,当您尝试检索 Elasticsearch 中某个任务的结果时,如果该任务未运行或尚未存储其结果,则会出现此错误。这可能是由于任务被取消、失败或根本未启动导致的。要解决此问题,您可以使用任务管理 API 检查任务的状态。如果任务未运行,您可能需要重新启动它。如果它尚未存储结果,您可能需要等待其完成或检查是否存在阻止其存储结果的问题。

日志上下文 #

日志 “task [{}] isn’t running and hasn’t stored its results” 的类名是 TransportGetTaskAction.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:

client.get(get; ActionListener.wrap(r -> onGetFinishedTaskFromIndex(r; listener); e -> {
 if (ExceptionsHelper.unwrap(e; IndexNotFoundException.class) != null) {
 // We haven't yet created the index for the task results so it can't be found.
 listener.onFailure(
 new ResourceNotFoundException("task [{}] isn't running and hasn't stored its results"; e; request.getTaskId())
 );
 } else {
 listener.onFailure(e);
 }
 }));