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

版本: 8.6-8.9

简要来说,当 Elasticsearch 无法找到期望的平衡分配器(Desired Balance Allocator)时会出现此错误,该分配器负责在集群的节点之间分发分片。这可能是由于配置错误或集群设置问题导致的。要解决此问题,您可以检查并更正集群设置,确保期望的平衡分配器已正确配置和启用。此外,您可能需要重启 Elasticsearch 服务以使更改生效。如果问题仍然存在,建议检查节点的健康状况和分片的分布情况。

日志上下文 #

日志 “Desired balance allocator is not in use; no desired balance found” 的类名是 TransportDeleteDesiredBalanceAction.java。 我们从 Elasticsearch 源代码中提取了以下内容,供寻求深入背景的人参考:

DesiredBalanceRequest request,
 ClusterState state,
 ActionListenerlistener
 ) throws Exception {
 if (resetDesiredBalanceTaskQueue == null) {
 listener.onFailure(new ResourceNotFoundException("Desired balance allocator is not in use; no desired balance found"));
 return;
 }
 resetDesiredBalanceTaskQueue.submitTask(
 "reset-desired-balance",
 new ResetDesiredBalanceTask(listener.map(ignored -> ActionResponse.Empty.INSTANCE));