How To Solve Issues Related to Log – Adding to . new blacklisted methods

Prevent Your Next ELK Incident

Try our free Check Up to test if your ES issues are caused from misconfigured settings

Prevent Issue

Updated: Feb-20

In-Page Navigation (click to jump) :

Opster Offer’s World-Class Elasticsearch Expertise In One Powerful Product
Try Our Free ES Check-Up   Prevent Incident

Troubleshooting background

To troubleshoot Elasticsearch log “Adding to . new blacklisted methods” it’s important to understand common problems related to Elasticsearch concepts: thread. See detailed explanations below complete with common problems, examples and useful tips.


To help troubleshoot related issues we have gathered selected Q&A from the community and issues from Github , please review the following for further information :

1 Java ElasticSearch None of the configured nodes are available 133.95 K 56

2Elasticsearch – Looking for a performant way of must_not with ids 0.29 K  2


Log Context

Log ”adding {} to [{}]; new blacklisted methods: {}” classname is ScriptService.java
We have extracted the following from Elasticsearch source code to get an in-depth context :

             GroovyScriptEngineService engine = (GroovyScriptEngineService) ScriptService.this.scriptEnginesByLang.get(GroovyScriptEngineService.NAME);
            if (engine != null) {
                String[] patches = settings.getAsArray(GroovyScriptEngineService.GROOVY_SCRIPT_BLACKLIST_PATCH; Strings.EMPTY_ARRAY);
                boolean blacklistChanged = engine.addToBlacklist(patches);
                if (blacklistChanged) {
                    logger.info("adding {} to [{}]; new blacklisted methods: {}"; patches;
                            GroovyScriptEngineService.GROOVY_SCRIPT_BLACKLIST_PATCH; engine.blacklistAdditions());
                    engine.reloadConfig();
                    // Because the GroovyScriptEngineService knows nothing about the
                    // cache; we need to clear it here if the setting changes
                    ScriptService.this.clearCache();






About Opster

Opster identifies and predicts root causes of Elasticsearch problems, provides recommendations and can automatically perform various actions to prevent issues, optimize performance and save resources.

Learn more: Glossary | Blog| Troubleshooting guides | Error Repository

Need help with any Elasticsearch issue ? Contact Opster