Error running %s – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8.4-8.9

Briefly, this error occurs when there’s an issue executing a search query in Elasticsearch. This could be due to a variety of reasons such as incorrect query syntax, insufficient permissions, or issues with the Elasticsearch cluster itself. To resolve this, you can check the syntax of your query, ensure the user has the correct permissions to execute the search, or check the health of your Elasticsearch cluster. If the cluster is unhealthy, you may need to troubleshoot further or consider restarting it.

This guide will help you check for common problems that cause the log ” Error running %s ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: mustache.

Log Context

Log “Error running %s” classname is MustacheScriptEngine.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        public String execute() {
            final StringWriter writer = new StringWriter();
            try {
                template.execute(writer; params);
            } catch (Exception e) {
                logger.error(() -> format("Error running %s"; template); e);
                throw new GeneralScriptException("Error running " + template; e);
            }
            return writer.toString();
        }
    }

 

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?