Indexer job encountered IndexerState STOPPING state halting indexer – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

Briefly, this error occurs when an Elasticsearch indexing job is interrupted due to the indexer entering a ‘STOPPING’ state. This could be due to a variety of reasons such as system resource constraints, network issues, or manual intervention. To resolve this issue, you can try restarting the indexing job, ensuring that the system has sufficient resources, and checking the network connectivity. If the problem persists, you may need to investigate the logs for more specific error messages that could indicate the root cause of the issue.

This guide will help you check for common problems that cause the log ” Indexer job encountered [” + IndexerState.STOPPING + “] state; halting indexer. ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, indexer, indexing.

Log Context

Log “Indexer job encountered [” + IndexerState.STOPPING + “] state; halting indexer.” classname is AsyncTwoPhaseIndexer.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            case INDEXING:
                // normal state;
                return true;

            case STOPPING:
                logger.info("Indexer job encountered [" + IndexerState.STOPPING + "] state; halting indexer.");
                doSaveState(finishAndSetState(); getPosition(); this::afterFinishOrFailure);
                return false;

            case STOPPED:
                return false;

 

 [ratemypost]