Elasticsearch version:
7.17.15 + SearchGuard 53.8.0
Server OS version:
Windows Server 2019 Standard 10.0.17763
Describe the issue:
SearchGuard fails on Elasticsearch startup when using Oracle Java 8 update 391 (in fact, also earlier minor releases). This should be supported according to Elasticsearch Java support matrix and SearchGuard documentation.
Steps to reproduce:
The steps are complex, I can provide an exact guide if needed. In short summary, I did this:
- Downloaded elasticsearch 7.17.15 + Search Guard 53.8
- Installed Search Guard 53.8 to elasticsearch 7.17.15
- Prepared config/elasticsearch.yml and plugins\search-guard-53.8.0\sgconfig configurations
- Generated certificates using Search Guard Offlien TLS Tool 1.9.1
- Started elasticsearch by running bin/elasticsearch.bat
Problem:
Elasticsearch failed to start with the following error:
java.lang.UnsupportedClassVersionError: org/apache/cxf/rs/security/jose/jwt/JwtException has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.net.FactoryURLClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.floragunn.searchguard.SearchGuardPlugin.createComponents(SearchGuardPlugin.java:840)
at org.elasticsearch.node.Node.lambda$new$17(Node.java:731)
at java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.collect(Unknown Source)
at org.elasticsearch.node.Node.(Node.java:745)
at org.elasticsearch.node.Node.(Node.java:309)
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:234)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:234)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:434)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:169)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:160)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
at org.elasticsearch.cli.Command.main(Command.java:77)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:125)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)
Expected behavior:
Successful start of elasticsearch
Additional data:
java -version
java version “1.8.0_391”
Java™ SE Runtime Environment (build 1.8.0_391-b13)
Java HotSpot™ 64-Bit Server VM (build 25.391-b13, mixed mode)