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 16, 2018 in Big Data Hadoop by nitinrawat895
• 9,490 points
599 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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 16, 2018 by Shubham
• 12,890 points
Thanks! Works.
+1 vote
hadoop dfsadmin -safemode leave
answered Apr 11 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,040 points
109 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,260 points
274 views
0 votes
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
• 66,910 points
42 views
0 votes
1 answer

How to restrict nodes that talk to namenode?

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

answered Jan 4 in Big Data Hadoop by Omkar
• 66,910 points
15 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 in Big Data Hadoop by Frankie
• 9,710 points
18 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 7 in Big Data Hadoop by Gitika
• 14,910 points
25 views
0 votes
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
• 9,490 points
1,847 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
9,174 views
0 votes
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,260 points
660 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.