1
votes

I have installed the hadoop 2.6 on ubuntu 14.04.I just followed this blog.

While I am trying to format the namenode, I am hitting with below error:

hduser@data1:~$ hadoop namenode -format
DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it.
/usr/local/hadoop/bin/hdfs: line 276: /home/hduser/usr/lib/jvm/java-7-openjdk-amd64/bin/java: No such file or directory

3
Can you please share the configurations. Also share the value of JAVA_HOMEAmal G Jose
fixed the problem.. I have just added the line export HADOOP_PREFIX=$HADOOP_HOME in the bashrc file .Now its working fine .Also i was faced some problem while the formatting the namenode ..that problem was fixed by after deleting the namenode and datanode folder .And again formatted the namenode .Thanks! –senthilkumar

3 Answers

0
votes

/home/hduser/usr/lib/jvm/java-7-openjdk-amd64/bin/java: No such file or directory

This error occurs because the JAVA_HOME you have provided does not have java.

Just add this line in hadoop-env.sh and /home/hduser/.bashrc:

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
0
votes

I think you have already set the $JAVA_HOME but you did it wrong (just a guess):

/home/hduser/usr/lib/jvm/java-7-openjdk-amd64/bin/java

It would be :

/usr/lib/jvm/java-7-openjdk-amd64/bin/java

You probably have added ~ before the path when you exported that JAVA_HOME and this added the home directory /home/hduser.

To check this out, type java -version and see if java is working. And type echo $JAVA_HOME and check the path manually.

0
votes

I figured out. The entry we made was for amd64. it is really i386 computers. Please verify the path and that should fix the issue.