Bundled version of OpenJDK in open distro for Elasticsearch

Hi all,

I have installed open distro for elasticsearch using zip file. I can see
it might has a bundled version of OpenJDK from the JDK maintainers (GPLv2+CE) within each distribution. JVM is located within the jdk directory of the ODFE home directory just like Elasticsearch.
Can we use that insted of installing own version.
Coming towards elasticsearch 7.10.0 it is working. but ODEF based on elasticsearch 7.10.0 is not.
Do we have a bundled version of JDK really in ODEF?

Hi @pranali4796,
The ODFE zip has JDK bundled in it and it can used instead of your own version. Please find the below results.

(ODFE 1.12 - based on ES 7.10)
odfe-1.12.0\opendistroforelasticsearch-1.12.0\jdk\bin>.\java -version
openjdk version “15.0.1” 2020-10-20
OpenJDK Runtime Environment AdoptOpenJDK (build 15.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 15.0.1+9, mixed mode, sharing)

(ODFE 1.13 - based on ES 7.10.2 )
opendistroforelasticsearch-1.13.0-windows-x64\opendistroforelasticsearch-1.13.0\jdk\bin>.\java -version
openjdk version “15.0.1” 2020-10-20
OpenJDK Runtime Environment AdoptOpenJDK (build 15.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 15.0.1+9, mixed mode, sharing)

Hi @sreekarj
I have set java home jre1.8.0_201. Now I have opendistroforelasticsearch-1.13.0 installed. But it could not start due to some java error.
I have Elasticsearch 7.10.2 also installed on same machine and it works as it is using java bundle.
Do you have any idea why don’t ODFE could not find jdk bundle?

Hi @pranali4796,
Can you please inform if you are following the steps informed here: Install and Configure - Open Distro Documentation

If possible please add a snippet of the error you are receiving.

hi
I have read and followed all those steps for documentation part.
here are my logs:

oles [master, remote_cluster_client, data, ingest]
[2021-02-24T09:06:09,864][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [machine-name] fatal error in thread [main], exiting
java.lang.NoSuchMethodError: java.nio.file.Path.of(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
at com.amazon.opendistroforelasticsearch.reportsscheduler.settings.PluginSettings.(PluginSettings.kt:259) ~[?:?]
at com.amazon.opendistroforelasticsearch.reportsscheduler.ReportsSchedulerPlugin.getSettings(ReportsSchedulerPlugin.kt:87) ~[?:?]
at org.elasticsearch.plugins.PluginsService.lambda$getPluginSettings$0(PluginsService.java:94) ~[elasticsearch-7.10.2.jar:7.10.2]
at java.util.stream.ReferencePipeline$7$1.accept(Unknown Source) ~[?:1.8.0_201]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) ~[?:1.8.0_201]
at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:1.8.0_201]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:1.8.0_201]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[?:1.8.0_201]
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:1.8.0_201]
at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[?:1.8.0_201]
at org.elasticsearch.plugins.PluginsService.getPluginSettings(PluginsService.java:94) ~[elasticsearch-7.10.2.jar:7.10.2]
at org.elasticsearch.node.Node.(Node.java:387) ~[elasticsearch-7.10.2.jar:7.10.2]
at org.elasticsearch.node.Node.(Node.java:289) ~[elasticsearch-7.10.2.jar:7.10.2]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:227) ~[elasticsearch-7.10.2.jar:7.10.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.10.2.jar:7.10.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.10.2.jar:7.10.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.10.2.jar:7.10.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.10.2.jar:7.10.2]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.10.2.jar:7.10.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) ~[elasticsearch-cli-7.10.2.jar:7.10.2]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.10.2.jar:7.10.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.10.2.jar:7.10.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.10.2.jar:7.10.2]

@pranali4796 ,
Thanks for the error info. I have tried replicating the issue on my side, but the bundled java was working fine. Will look into it more and inform.

In the meantime, can you please try removing the Java path from your local, to see if the bundled Java is then picked up.

hi @sreekarj
I have tried that but not worked.

Hi @pranali4796,
Can you please inform which windows version are you using while installing zip. I will try running the test in similar machine to replicate.

Thanks.

i am using windows 10 enterprise. This might be a issue from open distro only. because Elasticsearch 7.10.0 is working and open distro version 1.12.0 is not working. Both have a similar JDK bundle.

Hi @pranali4796 ,
Can you please try on a different machine and also with ODFE 1.13.1 which is the latest version. I am unable to replicate the issue so would check if anyone else in the community are also facing similar issue.