Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Hadoop namenode never start

avatar
Contributor

Hi, i manually installed hadoop 2.7.4

However, namenode never start.

i can see datanode and secondrynamenode are starting.

the core_site.xml

<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://evotion00:54310</value>
 </property>


the hdfs_site.xml

<property>
  <name>dfs.replication</name>
  <value>3</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>file:/home/hduser/hadoop_store/hdfs/namenode</value>
 </property>
 <property>
   <name>dfs.data.dir</name>
   <value>file:/home/hduser/hadoop_store/hdfs/datanode</value>
 </property>


I tried, hadoop namenode -format and restart but not working.

Many thanks in advance.

1 ACCEPTED SOLUTION

avatar
Expert Contributor

Hi @Bin Ye, Check NameNode logs and share any error/exception. Some common issues:

  1. hostname specified in "fs.default.name" is valid. Also check if that port is not used by existing service.
  2. Proper file permission for dirs specified in "dfs.name.dir" and "dfs.data.dir"

View solution in original post

5 REPLIES 5

avatar
Expert Contributor

Hi @Bin Ye, Check NameNode logs and share any error/exception. Some common issues:

  1. hostname specified in "fs.default.name" is valid. Also check if that port is not used by existing service.
  2. Proper file permission for dirs specified in "dfs.name.dir" and "dfs.data.dir"

avatar
Contributor

Hi, @Ajay

When i format the namenode, it print out:

17/09/22 21:54:03 ERROR namenode.NameNode: Failed to start namenode.
java.io.IOException: Cannot create directory /hadoop/hdfs/namenode/current


In fact the hdfs_site.xml file is configred to store data in file:/home/hduser/hadoop_store/hdfs/namenode.

I don't understand how could this happen. This is a completely different location

Do you any reasons, why is this happening?

Many Thanks in advance.

Bin Ye

avatar
Expert Contributor

Hi @Bin Ye

Check for entry of "dfs.namenode.name.dir" in config files. Try to grep /hadoop/hdfs/namenode/current in config dir and see if you can locate the config file which is over-riding your settings.

avatar
Explorer

Hi @Bin Ye

You should change this property to fit your setting

    <property>
      <name>dfs.namenode.name.dir</name>
      <value>/hadoop/hdfs/namenode</value>
    </property>

avatar
Contributor

Many thanks, for your reply. I found the errors. I have two versions of hadoop installed and the config folder is symlink to other place.