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,040 points
156 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 65,850 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 in Big Data Hadoop by Suman
8 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
• 12,270 points
188 views
+10 votes
10 answers
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
• 12,270 points
537 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
• 12,270 points
264 views
0 votes
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
• 9,070 points
1,678 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
• 9,070 points
132 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
• 65,850 points
36 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
158 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.