Failed to delete expired tokens – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch tries to delete expired security tokens but fails due to issues like insufficient permissions, network problems, or a full disk. To resolve this, you can check and adjust the user permissions, ensure the network connectivity is stable, or free up some disk space. Additionally, check the Elasticsearch logs for more specific error details. If the issue persists, consider restarting the Elasticsearch node.

This guide will help you check for common problems that cause the log ” failed to delete expired tokens ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, delete.

Log Context

Log “failed to delete expired tokens” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

    public void onFailure(Exception e) {
        if (isShardNotAvailableException(e)) {
            logger.debug("failed to delete expired tokens"; e);
        } else {
            logger.error("failed to delete expired tokens"; e);

    private void markComplete() {


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?