-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elasticsearch doesn't find bundled JDK #44139
Comments
Pinging @elastic/es-core-infra |
@dandago Can you please check you do not already have a JAVA_HOME set? Something like |
@rjernst You are right, I did have JAVA_HOME set to a directory that no longer exists. It works if I clear it. In this case, I'm afraid the error:
...is misleading. I would have thought that if it fails to find the JDK in JAVA_HOME then it would look for the bundled one (which exists at the directory it is mentioning), but it seems to be relying entirely on JAVA_HOME if it is set. |
I finally find a way to slove this probem: the url is:https://stackoverflow.com/questions/49012969/could-not-find-java-home-elastcisearch execute this command: set JAVA_HOME=D:\java |
@cawoodm If JAVA_HOME is set, Elasticsearch will use that. There is no attempt to discern whether the version of is meant to be used with Elasticsearch. If you don't mean to use that java with Elasticsearch, unset JAVA_HOME when starting ES. |
Yes,I've sloved this problem by setting this PATH,thanks. |
If this is the behaviour, then the error shouldn't claim that it checked for the bundled JDK. |
I agree. The existing error message is a result of only slightly changing the old error message where we looked for JAVA_HOME and on the PATH. I will separate this out so it is clear when JAVA_HOME was used and that the path does not exist. |
These was the steps I followed to run ElasticSearch 7.13.2 on windows 10
|
@LIU-HONGYANG From v8, Elasticsearch intentionally ignores the |
Elasticsearch version (
bin/elasticsearch --version
):7.1.1 and 7.2.0.
Version: 7.1.1, Build: default/zip/7a013de/2019-05-23T14:04:00.380842Z, JVM: 12.0.1
Version: 7.2.0, Build: default/zip/508c38a/2019-06-20T15:54:18.811730Z, JVM: 12.0.1
Plugins installed: []
Nothing extra. Just vanilla Elasticsearch.
JVM version (
java -version
):Whatever is bundled with the respective versions (see Elasticsearch version output above).
OS version (
uname -a
if on a Unix-like system):Windows 10 Home
Build 17134.829
Description of the problem including expected versus actual behavior:
Even though the JDK is bundled with Elasticsearch as from version 7.0, I still have to set JAVA_HOME for it to work. Elasticsearch complains that it can't find Java bundled at the directory where it actually exists. See the thread I posted at Discuss Elastic which shows the output with Elasticsearch 7.1.1.
Steps to reproduce:
elasticsearch.bat
Provide logs (if relevant):
N/A
The text was updated successfully, but these errors were encountered: