How to exit NameNode safe mode

0 votes

I am trying to make a directory in HDFS but getting an error saying NameNode is in safe mode

hdfs# bin/hadoop fs -mkdir test

mkdir: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create directory /user/root/test. Name node is in safe mode.

After some browsing I found this command to leave safe mode, but still I am getting the error.

hdfs# bin/hadoop fs -safemode leave
safemode: Unknown command

Can someone me help me out?

Apr 17, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
3,480 views

2 answers to this question.

0 votes

The error you are getting is because -safemode is not an argument of hadoop fs, but is the argument of dfsadmin

You need to use the following command to leave the safemode forcefully:

hdfs dfsadmin -safemode leave

You can also use hadoop dfsadmin, but it has been deprecated

answered Apr 17, 2018 by Shubham
• 13,490 points
Thanks! Works.
+1 vote
hadoop dfsadmin -safemode leave
answered Apr 11, 2019 by anonymous
Thanks! Works.

Related Questions In Big Data Hadoop

0 votes
1 answer

How to exit name node from safe mode?

In order to forcefully let the namenode ...READ MORE

answered Sep 26, 2018 in Big Data Hadoop by slayer
• 29,350 points
1,711 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,390 points
1,532 views
–1 vote
1 answer

How to start namenode and datanode individually?

You can use these commands. For namenode: ./hadoop-daemon.sh start ...READ MORE

answered Dec 21, 2018 in Big Data Hadoop by Omkar
• 69,210 points
9,762 views
–1 vote
1 answer

How to restrict nodes that talk to namenode?

Step 1: Create includes file in /home/hadoop ...READ MORE

answered Jan 5, 2019 in Big Data Hadoop by Omkar
• 69,210 points
424 views
0 votes
1 answer

How to run Nutch in Hadoop installed in pseudo-distributed mode

Make sure you have built Nutch from ...READ MORE

answered Jan 24, 2019 in Big Data Hadoop by Frankie
• 9,830 points
760 views
0 votes
1 answer

how to execute pig script in MapReduce mode?

Hey, To execute pig script we can use ...READ MORE

answered May 8, 2019 in Big Data Hadoop by Gitika
• 65,910 points
1,039 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
• 11,380 points
10,556 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
104,204 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,390 points
4,260 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP