Troubles starting elasticsearch.service after the upgrade from 6.8.22 to 7.14.2

Hi Folks,

I have troubles starting Elasticsearch.service after the upgrade from 6.8.22 to 7.14.2.

The errors are related to:

  • failed to load plugin class [org.Elasticsearch.xpack.security.Security]
  • Realm settings have been changed to include the type as part of the setting key
  • Found invalid config: xpack.security.authc.realms.ldap1.secure_bind_password

Could you give me hints how to solve these, I have tried a lot of things?

[2022-01-18T03:18:22,626][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [mynode-1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.security.Security]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116) ~[elasticsearch-cli-7.14.2.jar:7.14.2]
        at org.elasticsearch.cli.Command.main(Command.java:79) ~[elasticsearch-cli-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81) ~[elasticsearch-7.14.2.jar:7.14.2]
Caused by: java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.security.Security]
        at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:718) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:654) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:474) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:158) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.node.Node.<init>(Node.java:360) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.node.Node.<init>(Node.java:281) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:219) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:219) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:399) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.14.2.jar:7.14.2]
        ... 6 more
Caused by: java.lang.reflect.InvocationTargetException
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:709) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:654) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:474) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:158) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.node.Node.<init>(Node.java:360) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.node.Node.<init>(Node.java:281) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:219) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:219) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:399) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.14.2.jar:7.14.2]
        ... 6 more
Caused by: java.lang.IllegalArgumentException: Incorrect realm settings found. Realm settings have been changed to include the type as part of the setting key.
For example 'xpack.security.authc.realms.file.my_file.order'
Found invalid config: xpack.security.authc.realms.ldap1.secure_bind_password
Please see the breaking changes documentation.
        at org.elasticsearch.xpack.security.Security.validateRealmSettings(Security.java:1044) ~[?:?]
        at org.elasticsearch.xpack.security.Security.runStartupChecks(Security.java:396) ~[?:?]
        at org.elasticsearch.xpack.security.Security.<init>(Security.java:383) ~[?:?]
        at org.elasticsearch.xpack.security.Security.<init>(Security.java:373) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:709) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:654) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:474) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:158) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.node.Node.<init>(Node.java:360) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.node.Node.<init>(Node.java:281) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:219) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:219) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:399) ~[elasticsearch-7.14.2.jar:7.14.2]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.14.2.jar:7.14.2]

Have you looked at the migration guide or upgrade guide?

The migrating to 7.0 page lists all the breaking changes between 6.x and 7.x and advice on how to resolve them.

In general, we recommend using the Kibana Upgrade Assistant in 6.8 to prepare for your upgrade to 7.x so that you can resolve these issues ahead of time. If that's still an option for you, it might be the best path forward.

Hi Tim,
Yes, I have been using these articles and I configured the Elasticsearch.yml according the documentation.
Still nothing helps.

The issue you have here:

is covered in the breaking changes here:

You need to remove xpack.security.authc.realms.ldap1.secure_bind_password from your elasticsearch keystore, and (unless you have already done so) add xpack.security.authc.realms.ldap.ldap1.secure_bind_password instead.

Thank you. This worked in my case.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.