Failed to derived initial shards from value ignore allocation for – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Briefly, this error occurs when Elasticsearch is unable to determine the initial shards due to an incorrect value set for the “ignore allocation” setting. This could be due to a misconfiguration or an invalid setting. To resolve this issue, you can check the cluster settings and ensure that the “ignore allocation” setting is correctly configured. If the problem persists, you may need to reset the setting to its default value or consider re-indexing your data.

This guide will help you check for common problems that cause the log ” [{}][{}] failed to derived initial_shards from value {}; ignore allocation for {} ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: allocation and shard.

Log Context

Log “[{}][{}] failed to derived initial_shards from value {}; ignore allocation for {}” classname is PrimaryShardAllocator.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                     }
                } else {
                    requiredAllocation = Integer.parseInt(initialShards);
                }
            } catch (Exception e) {
                logger.warn("[{}][{}] failed to derived initial_shards from value {}; ignore allocation for {}"; shard.index(); shard.id(); initialShards; shard);
            }
        }

        return nodesAndVersions.allocationsFound >= requiredAllocation;
    }




 

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?