Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to configure hadoop to run in pseudo-distributed mode. My configuration files:

core-site.xml:

<configuration>
    <property>
        <name>fs.default.name</name>
        <value>hdfs://localhost/</value>
    </property>
</configuration>

hdfs-site.xml:

<configuration>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
</configuration>

mapred-site.xml:

<configuration>
    <property>
        <name>mapred.job.tracker</name>
        <value>localhost:8021</value>
    </property>
</configuration>

the hadoop version I'm using command hadoop version is:

Hadoop 0.20.203.0
Subversion http://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-203 -r 1099333
Compiled by oom on Wed May  4 07:57:50 PDT 2011

I have set the JAVA_HOME environmental variable to:(I'm using fedora 15)

/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64

the output of export $JAVA_HOME is:

/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64

But when I run start-dfs.sh it says:

localhost: Error: JAVA_HOME is not set.

The only thing that log files show is the above statement. Could anyone help?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Check the hadoop-env.sh file in the Hadoop conf directory. Ensure the line exporting JAVA_HOME has been uncommented and set appropriately.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.