Cannot move any shard in the cluster as there is no node on which shards can be allocated – How to solve this OpenSearch error

Opster Team

Aug-23, Version: 1-1.1

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 cannot allocate shards to any node in the cluster, possibly due to lack of space, node failures, or misconfiguration. To resolve this, ensure all nodes are running and network-connected. Check for sufficient disk space and consider adding more nodes or increasing disk capacity. Also, review shard allocation settings in your OpenSearch configuration, as incorrect settings may prevent shard allocation. Lastly, ensure your cluster health is green or yellow, not red, as a red status indicates serious problems that could prevent shard allocation.

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 ” Cannot move any shard in the cluster as there is no node on which shards can be allocated ” to appear. To understand the issues related to this log, read the explanation below about the following OpenSearch concepts: shards, cluster, allocation, routing, shard, node.

Log Context

Log “Cannot move any shard in the cluster as there is no node on which shards can be allocated” classname is BalancedShardsAllocator.java.
We extracted the following from OpenSearch source code for those seeking an in-depth context :

                                    + ". Skipping shard iteration");
                    return;
                }
                //Early terminate node interleaved shard iteration when no eligible target nodes are available
                if(sorter.modelNodes.length == inEligibleTargetNode.size()) {
                    logger.info("Cannot move any shard in the cluster as there is no node on which shards can be allocated"
                                    + ". Skipping shard iteration");
                    return;
                }

                ShardRouting shardRouting = it.next();

 

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