Neethu Lalitha
Neethu Lalitha

Reputation: 3071

NameNode not starting in pseudo distributed mode

I am not able to view the files in my HDFS on hadoop fs -ls / command and I think it is because the name node is not running.I have tried formatting the namenode as well as changing the port in core-site.xml to a different value.Still my JPS is not listing NameNode .

Below are the files: 1)core-site.xml

               <configuration>
                       <property>
                       <name>hadoop.tmp.dir</name>
                       <value>/home/hduser/tmp</value>
                      <description>A base for other temporary directories.</description>
                        </property>
                         <property>
                         <name>fs.default.name</name>
                          <value>hdfs://localhost:50000</value>
                           <description>The name of the default file system. A URI whose
                          scheme and authority determine the FileSystem implementation. The
                          uri’s scheme determines the config property (fs.SCHEME.impl) naming
                           the FileSystem implementation class. The uri’s authority is used to
                                 determine the host, port, etc. for a filesystem.</description>
    </property>
    </configuration>

2)hdfs-site.sml

    <configuration>
                          <property>
                           <name>dfs.replication</name>
                              <value>1</value>
                              <description>Default block replication.
    The actual number of replications can be specified when the file is created.
    The default is used if replication is not specified in create time.
    </description>
    </property>
    <property>
         <name>dfs.name.dir</name>
        <value>/home/hduser/hadoop-1.2.1/data</value>
    </property>
    </configuration>

3)mapred-site.xml

                      <configuration>
                   <property>
         <name>mapred.job.tracker</name>
                           <value>localhost:54311</value>
             <description>The host and port that the MapReduce job tracker runs
                                 at. If “local”, then jobs are run in-process as a single map
                                 and reduce task.
                               </description>
                           </property>
                           </configuration>

JPS output is:

21043 JobTracker

21147 TaskTracker

21789 Jps

20839 DataNode

20957 SecondaryNameNode

Could anyone help?

Upvotes: 0

Views: 672

Answers (1)

agarwal_achhnera
agarwal_achhnera

Reputation: 2456

If occurs the same issue again then remove every thing from tmp folder by rm -rf tmp/ and then format the namenode, it should then start. Or you can also try to recover the namenode by bin/hdfs namenode -recover

Upvotes: 1

Related Questions