Unable to mark shard %s as failed – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8.9-8.9

Briefly, this error occurs when Elasticsearch cannot mark a specific shard as failed. This could be due to issues like network problems, disk space issues, or corruption of the shard. To resolve this, you can try to restart the Elasticsearch node, check for network connectivity issues, ensure there’s enough disk space, or consider reindexing the data if the shard is corrupted. If the problem persists, you might need to look into more specific logs to identify the root cause.

This guide will help you check for common problems that cause the log ” Unable to mark shard [%s] as failed ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: broadcast, shard.

Log Context

Log “Unable to mark shard [%s] as failed” classname is TransportBroadcastUnpromotableAction.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                    l.onResponse(TransportResponse.Empty.INSTANCE);
                }

                @Override
                public void onFailure(Exception sfe) {
                    logger.error(Strings.format("Unable to mark shard [%s] as failed"; shardRouting.shardId()); sfe);
                    l.onFailure(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?