I just installed Elastic Search 6.6. I ran it and it worked fine until I tried again a few hours later:
# /export1/opt/ELK_Bin/elasticsearch-6.6.1/bin/elasticsearch
which: no java in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin)
could not find java; set JAVA_HOME or ensure java is in PATH
[Dev root @ vm-63f1-8c50 /export1/opt/ELK_Bin]
# echo $JAVA_HOME
/export/opt/jdk/1.8.0_25l64/
The logs I got usually showed up on the console and now I can't even see what the larger issue is.
Java is installed and this has started up before. I'm not sure what went wrong...
That error is usually pretty conclusive, so it looks like something changed that means we can't find your java binary.
A few options to try:
Has the JAVA_HOME variable been exported to child processes?
Try the command below. If it doesn't find JAVA_HOME then you have a problem with your shell environment
env | fgrep JAVA
Does the JAVA_HOME variable point to a valid directory with a valid binary?
My env is ubuntu. I have same problem.The first commandfgrep JAVA is not result.But the second command can find the java dir.
But, I still have the err Could not find java; set JAVA_HOME or ensure java is in PATH
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.