Reputation: 79
I am trying to install Hadoop 2.6 in centos 7. I have done all the changes in bashrc and xml files. But whenever I’m trying to run the command “Hdfs namenode format” it is giving the below error. I have set the java path and all other variables. Kindly help me with this. I am attaching the error screen shot
Upvotes: -1
Views: 1175
Reputation: 23
Unfortunately i resolved the issue for myself and this may be useful for you my friend user2925298
cd /etc/alternatives ==>the path for the java you can see is /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/bin/java
In the config file hadop-env.sh set the Java_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre and use the same path to bashrc vim ~./bashrc
set the JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre
Note : do not include bin after jre. as we set the path in bash rc :PATH=JAVA_HOME/bin.
You can check the path in the picture that i highlighted
Upvotes: 0
Reputation: 47
It seem you it is not getting java on your location.to be sure you check your java location by command
echo $JAVA_HOME
then compare.
Upvotes: 0