How to restart failed Namenode?

0 votes

I have created a hadoop cluster with shared storage for having HA following edureka article in https://www.edureka.co/blog/how-to-set-up-hadoop-cluster-with-hdfs-high-availability/

I noticed that Namenode on one of the host failed and the other namenode became active. So currently it's running only one namenode. There are no bad blocks or loss of data. How do I restart the namenode failed on the host in standby mode without losing any data? Any backup steps need to be followed to be safe before proceeding further?

Jul 23, 2019 in Big Data Hadoop by Karan
171 views

1 answer to this question.

0 votes

You need to solve the issue which caused your active name node to stop. Once that is done please run the command 

hdfs namenode -bootstrapStandby

 on the NameNode still down, then turn in on again. This node becomes Standby NameNode

Please follow the below steps:

Copy the HDFS Metadata from active name node to standby namenode.

Command

hdfs namenode -bootstrapStandby

Copy the HDFS Meta data from Active name node to Standby Name node

Copy the HDFS Metadata from Active name node to Standby Namenode. Once you run this command, you will get the information from which node and location the metadata is copying and whether it is copying successfully or not.

Information of Active namenode details

Information on Active namenode details.

Once Metadata is copied from Active namenode to standby namenode, you will get the message shown below in the screenshot.

Information regarding HDFS in Standby Name node

Information regarding HDFS in Standby Namenode.

Start the namenode daemon in Standby namenode machine.

Command

hadoop-daemon.sh start namenode

Now the name node which was down will become passive name node.

answered Jul 23, 2019 by Ishan

Related Questions In Big Data Hadoop

+1 vote
2 answers

Failed to restart Hadoop namenode using cloudera quickstart

You can use cloudera manager to manage ...READ MORE

answered Mar 19, 2018 in Big Data Hadoop by kurt_cobain
• 9,310 points
1,367 views
+3 votes
0 answers

How to handle Sqoop failure program and restart the job from failed tables?

When running a Sqoop jobs on a ...READ MORE

Aug 29, 2019 in Big Data Hadoop by Kunal
• 150 points

edited Sep 5, 2019 by Kunal 402 views
0 votes
1 answer

How to configure secondary namenode in Hadoop 2.x ?

bin/hadoop-daemon.sh start [namenode | secondarynamenode | datanode ...READ MORE

answered Apr 6, 2018 in Big Data Hadoop by kurt_cobain
• 9,310 points
628 views
0 votes
2 answers

How to exit NameNode safe mode?

hadoop dfsadmin -safemode leave READ MORE

answered Apr 11, 2019 in Big Data Hadoop by anonymous
1,446 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,920 points
5,081 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,920 points
724 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyF ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
30,088 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,310 points
1,898 views
0 votes
3 answers

How to change the delimiter in Sqoop?

--fields-terminated-by <char> READ MORE

answered Jun 25, 2019 in Big Data Hadoop by anonymous
3,501 views
0 votes
2 answers

How to see MySql service is running or not using linux command?

Hi, You can simply run the following commands ...READ MORE

answered Jan 21 in Big Data Hadoop by anonymous
84 views