I am unable to run elasticsearch when I run service elasticsearch start the ff below is what I did
[root@dc-lab05-06LVM ~]# export JAVA_HOME=/opt/jdk1.8.0_121/jre
[root@dc-lab05-06LVM ~]# echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/jdk1.8.0_121/bin/ opt/jdk1.8.0_121/jre/bin:/root/bin
[root@dc-lab05-06LVM ~]# echo $JAVA_HOME
/opt/jdk1.8.0_121/jre
[root@dc-lab05-06LVM ~]# java -version
java version “1.8.0_121”
Java™ SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot™ 64-Bit Server VM (build 25.121-b13, mixed mode)
[root@dc-lab05-06LVM ~]# service elasticsearch start
Starting elasticsearch: which: no java in (/sbin:/usr/sbin:/bin:/usr/bin)
Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME
[FAILED]
[root@dc-lab05-06LVM ~]# $PATH
-bash: /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin: No such file or directory
I tried it on Java, but it fails with the same error message, can you please point to to which line number exactly on ES startup script(what exactly is the filename - I just want to be sure, I am just a newbie on this arena). I appreciate your help.
This is very good guide sir! , I will have to reinstall again, strange I was able to install JDK 1.8.0_121 on our cloud, but know having some troible getting it to work on my local VM setup.. Thank you
I am still getting the same error even if I already changed to jdk1.8.0_131 rpm
Starting elasticsearch: which: no java in (/sbin:/usr/sbin:/bin:/usr/bin)
Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME
[FAILED]
It fails also when I install the update alternatives
alternatives --install /usr/bin/jar jar /usr/java/jdk1.8.0_131/bin/jar 2
alternatives --install /usr/bin/javac javac /usr/java/jdk1.8.0_131/bin/javac 2
That is an interesting article mate, I’ll get to that once I get past this.
I am still getting this error when I run service elasticsearch, but when I issue it from /usr/share/elasticsearch/bin I can execute elasticsearch with no problem the nodes all start up
genuser@c0n0_12 elasticsearch]# service elasticsearch start
Starting elasticsearch: which: no java in (/sbin:/usr/sbin:/bin:/usr/bin)
Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME
[FAILED]