Desired balance allocator is not in use no desired balance found – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 8.6-8.9

Briefly, this error occurs when Elasticsearch is unable to find the desired balance allocator, which is responsible for distributing shards across the nodes in a cluster. This could be due to misconfiguration or an issue with the cluster settings. To resolve this, you can check and correct the cluster settings, ensuring that the desired balance allocator is properly configured and enabled. Additionally, you may need to restart the Elasticsearch service for the changes to take effect. If the problem persists, consider checking the health of your nodes and the distribution of your shards.

This guide will help you check for common problems that cause the log ” Desired balance allocator is not in use; no desired balance found ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: admin, allocation, cluster.

Log Context

Log “Desired balance allocator is not in use; no desired balance found” class name is TransportDeleteDesiredBalanceAction.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 DesiredBalanceRequest request;
 ClusterState state;
 ActionListener listener
 ) 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));

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?