2

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!

M.A.Murali
  • 9,988
  • 36
  • 105
  • 182

1 Answers1

0

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.

Amit
  • 30,756
  • 6
  • 57
  • 88
  • I uninstalled openjdk 13.x.x and installed Open JDK 14.0.1 as recommended for Elasticsearch 7.7.x but facing the same issue. – M.A.Murali Jun 15 '20 at 13:04
  • csan you show your elasticsearch.yml and jvm.options? – Amit Jun 15 '20 at 13:17
  • 1
    Hi @Opster, actually I completely uninstalled my JDK and Elastic search comes with JDK, simply used it. ThanKs !!! – M.A.Murali Jun 15 '20 at 17:39
  • @M.A.Murali hope you are safe, it would be great if you can do the needful as suggested in my last comment – Amit Jun 26 '20 at 08:57