Skip to content

Conversation

@rjernst
Copy link
Member

@rjernst rjernst commented Aug 29, 2019

Since the bundled jdk was added to Elasticsearch, there are now 2 ways
java can be missing. Either JAVA_HOME is set but does not exist, or the
bundled jdk does not exist. This commit improves the error messages in
those two cases, and also ensures our tests cover both cases.

closes #44139

Since the bundled jdk was added to Elasticsearch, there are now 2 ways
java can be missing. Either JAVA_HOME is set but does not exist, or the
bundled jdk does not exist. This commit improves the error messages in
those two cases, and also ensures our tests cover both cases.
@rjernst rjernst added >enhancement :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts v8.0.0 v7.4.0 labels Aug 29, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@nik9000
Copy link
Member

nik9000 commented Aug 29, 2019

@elasticmachine, run elasticsearch-ci/docs

@colings86 colings86 added v7.5.0 and removed v7.4.0 labels Aug 30, 2019
Copy link
Contributor

@pugnascotia pugnascotia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good.

I wondered if we should sync the control flow of elasticsearch-env and elasticsearch-env.bat, since the former checks whether JAVA is executable in both the bundled and non-bundled branches, whereas the latter has a check after both branches.

@rjernst rjernst merged commit fab41a5 into elastic:master Oct 2, 2019
@rjernst rjernst deleted the java_home_check2 branch October 2, 2019 05:09
rjernst added a commit that referenced this pull request Oct 2, 2019
Since the bundled jdk was added to Elasticsearch, there are now 2 ways
java can be missing. Either JAVA_HOME is set but does not exist, or the
bundled jdk does not exist. This commit improves the error messages in
those two cases, and also ensures our tests cover both cases.
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
@douglasawh
Copy link

douglasawh commented Jun 21, 2021

UPDATE: figured it out. that user didn't own the entire file path. I'll leave the rest in case others run into the issue.

I still see this error in 7.11.2

./elasticsearch
could not find java in bundled jdk at /root/downloadedSource/elasticsearch-7.11.2/jdk/bin/java

sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 31

My user owns those files and directories, so not sure why it couldn't find it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts >enhancement Team:Delivery Meta label for Delivery team v7.5.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Elasticsearch doesn't find bundled JDK

8 participants