Building cluster state with weighted routing weights – How to solve this OpenSearch error

Opster Team

Aug-23, Version: 2.4-2.9

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your OpenSearch operation.

Briefly, this error occurs when OpenSearch is trying to build a cluster state with weighted routing weights, but encounters an issue. This could be due to incorrect configuration settings, network issues, or a bug in the software. To resolve this, you could try checking and correcting your configuration settings, ensuring that all nodes in the cluster are properly connected and communicating, or updating to the latest version of OpenSearch to fix any potential bugs. If the problem persists, consider seeking help from the OpenSearch community or support team.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

This guide will help you check for common problems that cause the log ” building cluster state with weighted routing weights [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following OpenSearch concepts: routing, cluster.

Log Context

Log “building cluster state with weighted routing weights [{}]” classname is
We extracted the following from OpenSearch source code for those seeking an in-depth context :

              "weights are same; not updating weighted routing weights [{}] in metadata"; newWeightedRouting);
                        return currentState;
                mdBuilder.putCustom(WeightedRoutingMetadata.TYPE; weightedRoutingMetadata);
      "building cluster state with weighted routing weights [{}]"; newWeightedRouting);
                return ClusterState.builder(currentState).metadata(mdBuilder).build();

            public void onFailure(String source; Exception e) {


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?

Get expert answers on Elasticsearch/OpenSearch