ELASTIC SEARCH 7.9.3 not able to start on OPEN JDK

I want to use open jdk for my elastic search rather than bundled jdk. I have set up .bash_profile variables as below but Elastic search keeps on failing to start up with below error.PLEASE HELP !!

could not find java in JAVA_HOME at /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-0.el7_9.x86_64/jre/bin/bin/java

My JAVA_HOME variables in .bash_profile are set as below

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-0.el7_9.x86_64/jre/bin/bin/java
export PATH=$JAVA_HOME/bin:$PATH:
export PATH

The path you are setting does not look correct

... /jre/bin/bin/java

Typically it is set to the base path of the Java install

Should probably be

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-0.el7_9.x86_64

1 Like

Hi Stephen,
Thanks for replying. Yes, I tried it setting that way as well but had no luck either. Then I removed open jdk8 and installed openjdk-11 and pointed the path same way as you described and elastic search came up. So not sure why it don’t like openjdk8.

But all is good now and running on openjdk-11

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