Unable to set JAVA_HOME path.

0 votes

While working on Hadoop Implementation in Pseudo-Distributed Operation, I found following exception of JAVA_HOME variable not set, but When I tried to echo it, it was set.

Variable is preset in conf/hadoop-env.sh (edited export JAVA_HOME=/usr/lib/jvm/java-6-sun), bash.bashrc.

usr@usr-HP-G62-Notebook-PC:~/hadoop-0.20.203.0$ echo $JAVA_HOME
/usr/lib/jvm/java-6-sun
usr@usr-HP-G62-Notebook-PC:~/hadoop-0.20.203.0$ bin/start-all.sh
starting namenode, logging to /home/usr/hadoop-0.20.203.0/bin/../logs/hadoop-usr-namenode-usr-HP-G62-Notebook-PC.out
localhost: starting datanode, logging to /home/usr/hadoop-0.20.203.0/bin/../logs/hadoop-usr-datanode-usr-HP-G62-Notebook-PC.out
localhost: Error: JAVA_HOME is not set. 
localhost: starting secondarynamenode, logging to /home/usr/hadoop-0.20.203.0/bin/../logs/hadoop-usr-secondarynamenode-usr-HP-G62-Notebook-PC.out
localhost: Error: JAVA_HOME is not set. 
starting jobtracker, logging to /home/usr/hadoop-0.20.203.0/bin/../logs/hadoop-usr-jobtracker-usr-HP-G62-Notebook-PC.out 
localhost: starting tasktracker, logging to /home/usr/hadoop-0.20.203.0/bin/../logs/hadoop-usr-tasktracker-usr-HP-G62-Notebook-PC.out
localhost: Error: JAVA_HOME is not set.
Nov 30, 2018 in Big Data Hadoop by slayer
• 29,270 points
379 views

1 answer to this question.

0 votes
Check if bin/start-all.sh doesn't override JAVA_HOME

put echo $JAVA_HOME inside that script straight before executes binaries.
answered Nov 30, 2018 by Omkar
• 69,000 points

Related Questions In Big Data Hadoop

0 votes
1 answer
0 votes
1 answer

How to set output path for sqoop generated code?

To set output path for the generated ...READ MORE

answered May 16, 2019 in Big Data Hadoop by Suman
45 views
0 votes
1 answer

Unable to Locate WinUtils Library in Hadoop binary path.

If you are facing this problem while running a ...READ MORE

answered Jul 11, 2019 in Big Data Hadoop by ravikiran
• 4,600 points
226 views
0 votes
1 answer

Unable to install RHadoop Packages?

I would recommend you to follow https://github.com/RevolutionAnalytics/rhadoop/wiki/Installing-RHadoop-on-RHEL ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by Shubham
• 13,380 points
527 views
0 votes
1 answer

Moving files in Hadoop using the Java API?

I would recommend you to use FileSystem.rename(). ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,380 points
1,155 views
0 votes
1 answer

Hadoop giving java.io.IOException, in mkdir Java code.

I am not sure about the issue. ...READ MORE

answered May 3, 2018 in Big Data Hadoop by Shubham
• 13,380 points
678 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,870 points
4,532 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,870 points
642 views
0 votes
1 answer

Hadoop on OSX “Unable to load realm info from SCDynamicStore”

Add the following to your hadoop-env.sh file: export ...READ MORE

answered Oct 8, 2018 in Big Data Hadoop by Omkar
• 69,000 points
76 views
+4 votes
3 answers

Unable to find file error- while Streaming Hadoop

Is python installed running on the slaves that ...READ MORE

answered Oct 16, 2018 in Big Data Hadoop by Vinith
538 views