Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Ambari Setup - Java home

avatar
Expert Contributor

Hello

i am installing ambari with a custom JDK, when i enter the java home path i am getting the following error.

ERROR: Exiting with exit code 1.
REASON: Downloading or installing JDK failed: 'Fatal exception: Java home path or java binary file is unavailable. Please put correct path to java home., exit code 1'. Exiting.


I have already installed java and exported the java_home variable and updated the path variable

[root@DB-HDP-Ambari bin]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/opt/jdk1.8.0_91/bin:/opt/jdk1.8.0_91/jre/bin
1 ACCEPTED SOLUTION

avatar
Expert Contributor

i updated the /etc/environment with the JAVA_HOME value file and the setup worked.

View solution in original post

3 REPLIES 3

avatar
Expert Contributor

i updated the /etc/environment with the JAVA_HOME value file and the setup worked.

avatar
Expert Contributor

Hi Ahmad,

Great to know that you managed

But Strange it supposed to work

what command did you use?

i use below command in my ambari setup and it works perfectly on different os

ambari-server setup –j /usr/java/jdk1.8.0_74

please refer for more http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.0.0/bk_ambari_reference_guide/content/ch_changin...

btw which OS you are working with ?

also i don think $PATH necessarily needs to be updated , we are already specifying "–j /usr/java/jdk1.8.0_74"

Just make sure on all machines you have teh java home accessible

avatar
Super Collaborator

You can also use ambari-server setup –j /usr/java/default