OnNewScrollContext listener listener failed – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8.3-8.9

Briefly, this error occurs when there’s a failure in the OnNewScrollContext listener in Elasticsearch. This listener is responsible for handling new scroll contexts, which are used for large data retrieval. The error could be due to a bug, a resource issue, or a problem with the data. To resolve this, you can try updating Elasticsearch to the latest version, increasing system resources, or checking the data for inconsistencies. If the error persists, you may need to debug the listener to identify the exact cause of the issue.

This guide will help you check for common problems that cause the log ” onNewScrollContext listener [” + listener + “] failed ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: scroll, index, shard.

Log Context

Log “onNewScrollContext listener [” + listener + “] failed” classname is SearchOperationListener.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        public void onNewScrollContext(ReaderContext readerContext) {
            for (SearchOperationListener listener : listeners) {
                try {
                } catch (Exception e) {
                    logger.warn(() -> "onNewScrollContext listener [" + listener + "] failed"; e);