Support Questions

Find answers, ask questions, and share your expertise

Got error java.io.IOException: NameNode is not formatted, but no option to format the name node

avatar
Explorer

"Version: Cloudera Enterprise Data Hub Edition Trial 5.11.0 (#101 built by jenkins on 20170412-1249 git: 70cb1442626406432a6e7af5bdf206a384ca3f98)" 

 

Failed to start Name Server for HDFS. with the following error "java.io.IOException: NameNode is not formatted." 

 

2017-07-03 00:14:56,117 ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: Failed to start namenode.
java.io.IOException: NameNode is not formatted.
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:222)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:1096)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:780)
at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:614)
at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:676)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:844)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:823)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1547)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1615)

 

Try to follow "http://www.cloudera.com/documentation/manager/5-0-x/Cloudera-Manager-Managing-Clusters/cm5mc_nn.html" to format the name node directory. but there is no such action in the action menu for the selected Name node instance. 

 

 

3 ACCEPTED SOLUTIONS

avatar
Champion

I belive you are having a runining namenode instances under HDFS .

When you should the namenode instance  - the format will be enabled . 

while it is runining it is disabled . 

 

But you should do the name format by carefully calculating the impact . 

 

Hadoop namenode directory contains the fsimage and edit files 
which holds the basic information's about hadoop file system such
as where is data available, which user created files (meta data ) If you format the namenode then the above information's are deleted from namenode directory
which is specified in the hdfs-site.xml as dfs.namenode.name.dir But you would still left out with datas on the hadoop but not namenode meta data refernce.

View solution in original post

avatar
Explorer

Thanks for the advise. I am new in hadoop world. your suggestion is very helpful. 

However, I am not so sure if the format option is avaiable through the interface after stopped name node. Here is my screen shot. Selection_102.png

 

Then I try to see if there is action I can take for selected instance, but there is no such option to format the namenode and recreate these checkpoint related files. 

Selection_103.png

 

Thanks again for your time. 

View solution in original post

avatar
Explorer

I found a alternative for this based on documentation https://www.cloudera.com/documentation/enterprise/latest/topics/cdh_ig_hdfs_cluster_deploy.html#topi...

 

Run the following Command and formated the Namenode. Thanks all 

 

sudo -u hdfs hdfs namenode -format

 

View solution in original post

5 REPLIES 5

avatar
Champion

I belive you are having a runining namenode instances under HDFS .

When you should the namenode instance  - the format will be enabled . 

while it is runining it is disabled . 

 

But you should do the name format by carefully calculating the impact . 

 

Hadoop namenode directory contains the fsimage and edit files 
which holds the basic information's about hadoop file system such
as where is data available, which user created files (meta data ) If you format the namenode then the above information's are deleted from namenode directory
which is specified in the hdfs-site.xml as dfs.namenode.name.dir But you would still left out with datas on the hadoop but not namenode meta data refernce.

avatar
Explorer

Thanks for the advise. I am new in hadoop world. your suggestion is very helpful. 

However, I am not so sure if the format option is avaiable through the interface after stopped name node. Here is my screen shot. Selection_102.png

 

Then I try to see if there is action I can take for selected instance, but there is no such option to format the namenode and recreate these checkpoint related files. 

Selection_103.png

 

Thanks again for your time. 

avatar
Explorer

I found a alternative for this based on documentation https://www.cloudera.com/documentation/enterprise/latest/topics/cdh_ig_hdfs_cluster_deploy.html#topi...

 

Run the following Command and formated the Namenode. Thanks all 

 

sudo -u hdfs hdfs namenode -format

 

avatar

Hi flushin101,

 

You can find the option to 'Format Name Node', by clicking on the instance on which you intend to format the name node, from the 'screen shot' you had pasted in the previous reply. Once you click on the node/host/instance, we are provided with the 'Actions' menu (displayed next to he host/node name). We can then find the 'Format' option within that drop down menu. 

 

Please ignore if you already knew this.

avatar

It looks like the instructions I had posted in my earlier post, are too vague!. So I thought of adding some screen shots to make it easier to understand.

 

1. From Cloudera Manager HOME, select the 'HDFS'.

Cloudera Manager Home.jpg

2. Once inside the HDFS home page, click on 'Instances' menu.

HDFS - home Page.jpg

3. Once the instances that make up the HDFS component of the CDH are listed, click on the Role Type 'NameNode'. We do NOT have to select 'NameNode', using the check box (this is what i was doing initially), but just click on the 'NameNode' itself.

NameNode - Selection.jpg

4. Once the NameNode instance's page comes up, select the 'Action' menu to find the 'FORMAT' option!.

NameNode _ Format Option.jpg

Click on it to perform the format of the 'NameNode'.