Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hadoop namenode never start

Solved Go to solution

Hadoop namenode never start

New 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

Accepted Solutions
Highlighted

Re: Hadoop namenode never start

Rising Star

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"
5 REPLIES 5
Highlighted

Re: Hadoop namenode never start

Rising Star

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"

Re: Hadoop namenode never start

New 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

Re: Hadoop namenode never start

Rising Star

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.

Re: Hadoop namenode never start

New Contributor

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>

Re: Hadoop namenode never start

New 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.

Don't have an account?
Coming from Hortonworks? Activate your account here