Running DELETE Index on String join indexNames get for job jobId – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.7

Briefly, this error occurs when an attempt is made to delete an index using a string join operation on index names for a specific job ID, but the operation fails. This could be due to the index not existing, insufficient permissions, or a network issue. To resolve this, ensure the index exists and the correct name is used. Check the user has the necessary permissions to delete the index. If it’s a network issue, ensure the Elasticsearch cluster is reachable and operational. Also, ensure the job ID is correct and associated with the intended index.

This guide will help you check for common problems that cause the log ” Running DELETE Index on [” + String.join(“; “; indexNames.get()) + “] for job [” + jobId + “] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index, plugin.

Log Context

Log “Running DELETE Index on [” + String.join(“; “; indexNames.get()) + “] for job [” + jobId + “]” classname is TransportDeleteJobAction.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        ActionListener customIndexSearchHandler = ActionListener.wrap(
                searchResponse -> {
                    if (searchResponse == null || searchResponse.getHits().getTotalHits().value > 0) {
                        deleteByQueryExecutor.onResponse(true); // We need to run DBQ and alias deletion
                    } else {
                        logger.info("Running DELETE Index on [" + String.join("; "; indexNames.get()) + "] for job [" + jobId + "]");
                        DeleteIndexRequest request = new DeleteIndexRequest(indexNames.get());
                        request.indicesOptions(IndicesOptions.lenientExpandOpen());
                        // If we have deleted the index; then we don't need to delete the aliases or run the DBQ
                        executeAsyncWithOrigin(
                                parentTaskClient.threadPool().getThreadContext();

 

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?