Plugin failed to invoke custom onModule method – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Briefly, this error occurs when a plugin in Elasticsearch fails to call a custom onModule method. This could be due to incorrect configuration, incompatible plugin version, or a bug in the plugin code. To resolve this issue, you can try the following: 1) Check and correct the plugin configuration, 2) Ensure the plugin version is compatible with your Elasticsearch version, 3) Debug the plugin code to identify and fix any bugs, or 4) Reinstall the plugin.

This guide will help you check for common problems that cause the log ” plugin {}; failed to invoke custom onModule method ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: Plugin.

Log Context

Log “plugin {}; failed to invoke custom onModule method” classname is PluginsService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

reference.onModuleMethod.invoke(plugin.v2(); module);
                        } catch (IllegalAccessException | InvocationTargetException e) {
                            logger.warn("plugin {}; failed to invoke custom onModule method"; e; plugin.v2().name());
                            throw new ElasticsearchException("failed to invoke onModule"; e);
                        } catch (Exception e) {
                            logger.warn("plugin {}; failed to invoke custom onModule method"; e; plugin.v2().name());
                            throw e;
                        }
                    }
                }
            }

 

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?