简体   繁体   中英

Java issue when starts Elasticsearch issue on Windows 10

I am new to Elasticsearch, I am facing java null pointer issue when starts Elasticsearch on my Windows 10 machine. I have installed Adopt Open JDK on my machine.

Command used to start Elasticsearch

bin>elasticsearch.bat

Issue:

D:\elk\elasticsearch-7.7.1\bin>elasticsearch.bat
Exception in thread "main" java.lang.NullPointerException
        at org.elasticsearch.tools.launchers.JvmErgonomics.extractHeapSize(JvmErgonomics.java:140)
        at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:60)
        at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:139)
        at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:95)

My Java version installed:

openjdk version "13.0.2" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.2+8)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.18.0, JRE 13 Windows 10 amd64-64-Bit Compressed References 20200117_154 (JIT enabled, AOT enabled)
OpenJ9   - 6968c18d7
OMR      - 7a1b0239a
JCL      - 9c5a41bd5f based on jdk-13.0.2+8)

Please guide me to resolve this java issue while starting Elastic search. Thanks!

According to Elasticsearch support matrix of 7.7 it doesn't support openjdk version "13.0.2" 2020-01-14 which looks like causing the issue.

Can you use the other supported version of JDK and try restarting Elasticsearch again.

Edit:- As mentioned in the comments of the answer, you need to uninstall the JDK 13 is its set as default JDK and even you can use the JDK provided in the Elasticsearch and can also check the jdk.options present in the config folder to debug the issue efficiently.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM