Schedule was triggered for job getJobId but prior indexer is still running – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.15

Briefly, this error occurs when an Elasticsearch job is triggered while a previous job with the same ID is still running. This can happen due to long-running jobs or overlapping schedules. To resolve this, you can increase the interval between job runs, ensure jobs are not scheduled too closely together, or optimize your Elasticsearch cluster to process jobs faster. Additionally, consider checking if the job is stuck and needs manual intervention to stop.

This guide will help you check for common problems that cause the log ” Schedule was triggered for job [” + getJobId() + “]; but prior indexer is still running ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: indexer, plugin, indexing.

Log Context

Log “Schedule was triggered for job [” + getJobId() + “]; but prior indexer is still running ” classname is AsyncTwoPhaseIndexer.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        final IndexerState currentState = state.get();
        switch (currentState) {
        case INDEXING:
        case STOPPING:
        case ABORTING:
            logger.warn("Schedule was triggered for job [" + getJobId() + "]; but prior indexer is still running " +
                "(with state [" + currentState + "]");
            return false;

        case STOPPED:
            logger.debug("Schedule was triggered for job [" + getJobId() + "] but job is stopped.  Ignoring trigger.");

 

 [ratemypost]