Skip to content
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

Don't set JAVA_HOME starting with ES 8.0 #1191

Closed
dliappis opened this issue Feb 19, 2021 · 0 comments · Fixed by #1241
Closed

Don't set JAVA_HOME starting with ES 8.0 #1191

dliappis opened this issue Feb 19, 2021 · 0 comments · Fixed by #1241
Assignees

Comments

@dliappis
Copy link
Contributor

Starting with Elasticsearch 8.0 (elastic/elasticsearch#69149) JAVA_HOME doesn't get honored. One should rely on ES_JAVA_HOME instead. This will also be supported starting with 7.12.0 having higher priority over JAVA_HOME and using JAVA_HOME will be deprecated.

Practically speaking for nightly benchmarks we generally rely on the bundled jdk, but if any user or internal tool needs to specify a different java version while we do add the bin directory in PATH we also specify JAVA_HOME which we define at least in

env["JAVA_HOME"] = java_home
.

As far as I understand we won't be broken right now given that JAVA_HOME/bin is in the PATH and Elasticsearch 8.0.0 will just ignore the environment variable JAVA_HOME. Therefore the priority for fixing this is not immediate.

Regarding the fix I think we need to:

  1. Rely on ES_JAVA_HOME when the distribution-version is >=8.0.0
  2. Rely on JAVA_HOME always when building Elasticsearch from source (when using the pipeline from-sources
  3. Adjust and enhance unit tests/IT tests as required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants