Logstash -Could not find any executable java binary. Please install java

Folks - somehow the 5.2 logstash cant find JAVA
5.2 ES & kibana run fine

nn775 ~ :( # rpm -q logstash
logstash-5.2.2-1.noarch

nn775 ~ # /usr/share/logstash/bin/logstash
Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME.

nn775 ~ :( # javac -version
javac 1.8.0_112

nn775 ~ # java -version
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)

nn775 ~ # echo $JAVA_HOME
/usr/java/jdk1.8.0_112/jre/bin/java

nn775 ~ # alternatives --config java

There are 4 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
   1           /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
   2           /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
   3           /usr/lib/jvm/jre-1.5.0-gcj/bin/java
*+ 4           /usr/java/jdk1.8.0_112/jre/bin/java

Any suggestions to get this to work?

This was raised as an issue. It was patched here, and the fix will be in Logstash 5.3.

Thank you, This is redhat 6.5 typically I have system v services but I dont see any service in /etc/init.d/

Also I dont run logstash as a service - I call the executable directly

/opt/logstash/bin/logstash –f /etc/logstash/conf.d/logstash.conf

for upstart
nn775 /etc/init.d # l /etc/init/log*
ls: cannot access /etc/init/log*: No such file or directory

for services
nn775 /etc/init.d # l /etc/init.d/log*
ls: cannot access /etc/init.d/log*: No such file or directory

tell me what file to edit I can do that

If you're calling directly...

JAVA_HOME=/path/to/java_home /opt/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf

Hummm.. interesting enough, I think this may be on my end...

I had JAVA_HOME wrong

correct JAVA_HOME is /usr/java/jdk1.8.0_112

Rather than those listed above

If I set that I have LS in my path and can just call
logstash -f /etc/logstash/conf.d/logstash.conf

sorry for the the confusion

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.