版本: 7.4-7.6
简要来说,当 Elasticsearch 从测试查询的响应中收到意外状态时会发生此错误。这可能是由于多种原因导致的,例如查询语法错误、网络问题或服务器故障。要解决此问题,您可以检查查询的语法,确保 Elasticsearch 服务器正常运行,并验证您的网络连接。如果问题持续存在,请考虑检查服务器日志以获取更详细的错误信息。
日志上下文 #
日志 “Unexpected status from response of test query:” 的类名是 Pivot.java. 我们从 Elasticsearch 源代码中提取了以下内容,供寻求深入上下文的用户参考:
listener.onFailure(new ElasticsearchStatusException("Unexpected null response from test query";
RestStatus.SERVICE_UNAVAILABLE));
return;
}
if (response.status() != RestStatus.OK) {
listener.onFailure(new ElasticsearchStatusException("Unexpected status from response of test query: " + response.status();
response.status()));
return;
}
listener.onResponse(true);
}; e -> listener.onFailure(new ElasticsearchStatusException("Failed to test query"; RestStatus.SERVICE_UNAVAILABLE; e))));





