Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8022461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:16:24+00:00 2026-06-04T22:16:24+00:00

Like everyone else in the world, I’m following this hadoop tutorial . I get

  • 0

Like everyone else in the world, I’m following this hadoop tutorial. I get to the point where I format HDFS, and I get this:

user@linux01:~$ sudo $HADOOP_INSTALL/bin/hadoop namenode -format
Error: JAVA_HOME is not set.

Well that’s funny, I set JAVA_HOME in my /etc/profiles.

user@linux01:~$ tail -n 4 /etc/profile
export JAVA_HOME=/usr/local/jdk1.6.0_32/bin
export JDK_HOME=$JAVA_HOME
export PATH=$PATH:/usr/local/jdk1.6.0_32/bin
export HADOOP_INSTALL=/usr/local/hadoop/hadoop-1.0.3

Did I mess that up somehow?

user@linux01:~$ echo $JAVA_HOME
/usr/local/jdk1.6.0_32/bin
user@linux01:~$ ls $JAVA_HOME
appletviewer  extcheck       jar        javac    and so forth...

Seems to work. Maybe it absolutely has to be set in my hadoop-env.sh?

# The java implementation to use.  Required.
export JAVA_HOME=$JAVA_HOME

Lazy, yeah, but I still get “JAVA_HOME is not set” with or without this comment. I’m running low on ideas. Anyone see anything I’m missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:16:25+00:00Added an answer on June 4, 2026 at 10:16 pm

    Thank you @Chris Shain and @Chris White for your hints. I was running hadoop as su, and su doesn’t automatically know about the environmental variables I set. I logged in as my hadoop user (I had chown’d the hadoop install directory to this user), and was able to format the hdfs.

    Secondary problem: When I tried to start Hadoop, NameNode and JobTracker started successfully but DataNode, SecondaryNameNode, and TaskTracker failed to start. I dug in a little bit. NameNode and JobTracker are started via hadoop-daemon.sh, but DataNode, SecondaryNameNode, and TaskTracker are started by hadoop-daemon*s*.sh. The resolution here was to properly set JAVA_HOME in conf/hadoop-env.sh.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Thanks to everyone out there helping newbies like me. So far I have this:
I would like to improve my user experience of the following code: HTML: <div
I've been working on my own django based blog (like everyone, I know) to
Right first of I would like to thank everyone for helping me out on
everyone. Please see example below. I'd like to supply a string to 'schedule_action' method
It seems to me like there's a lot of sheeping going on, with everyone
I'm trying to add an android-like spinner to my mobile website. To put everyone
everyone. I am an experienced C programmer trying to get adjusted to C++. I
I would like to know your opinions on how to handle this. I need
I've search around on these forums, and it seems like everyone has a slight

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.