Changing hostname in fs.default.name property puts Hadoop in safemode

0 votes

I have a CDH pseudo-distributed mode Hadoop cluster. It was working fine. Then as I was studying about the configuration files, I came across fs.default.name property present in core-site.xml file. Earlier my host was localhost, but I replaced it with hadoop.

After restarting the Hadoop daemons, Hadoop show that it is in safemode.

I got the following output:

$ hadoop dfsadmin -report
...
Safe mode is ON
Configured Capacity: 0 (0 B)
Present Capacity: 0 (0 B)
DFS Remaining: 0 (0 B)
DFS Used: 0 (0 B)
DFS Used%: NaN%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0

I am not able to execute -cat or -put command. It is showing that NameNode is in safe mode. Can anyone help in understanding how I can keep the hostname as Hadoop so that external systems can connect to it & my NameNode does not enter safe mode.

Apr 27, 2018 in Big Data Hadoop by coldcode
• 2,020 points
409 views

1 answer to this question.

0 votes

First of all, in Safe mode the HDFS filesystem is in read-only mode. So, all the read only applications can be executed but operations like write, create, delete cannot be performed.

Next, your hostname issue is because you machine cannot resolve your domain name. To do so, you need to append this in your file /etc/hosts:

192.168.1.1 (your own ip address)     hadoop.domain.com localhost
answered Apr 27, 2018 by Shubham
• 13,290 points

Related Questions In Big Data Hadoop

0 votes
1 answer
0 votes
1 answer

“no such file or directory" in case of hadoop fs -ls

The behaviour that you are seeing is ...READ MORE

answered May 9, 2018 in Big Data Hadoop by nitinrawat895
• 10,490 points

edited May 9, 2018 by nitinrawat895 2,084 views
0 votes
1 answer

Can I have a list of property files used in Hadoop Framework?

Here is a complete list of configuration ...READ MORE

answered Aug 14, 2018 in Big Data Hadoop by Frankie
• 9,810 points
58 views
+1 vote
1 answer

What is the technique to know the Default scheduler in hadoop?

Default scheduler in hadoop is JobQueueTaskScheduler, which is ...READ MORE

answered Oct 30, 2018 in Big Data Hadoop by Frankie
• 9,810 points
88 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
• 10,490 points
2,313 views
0 votes
10 answers

hadoop fs -put command?

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

answered Dec 7, 2018 in Big Data Hadoop by Aditya
11,908 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,240 points
880 views
0 votes
1 answer
0 votes
1 answer

Meaning of fs.defaultFS property in core-site.xml in hadoop

fs.default.name property in core-site.xml tells the address ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,290 points
1,073 views
+1 vote
2 answers

How to authenticate username & password while using Connector for Cloudera Hadoop in Tableau?

Hadoop server installed was kerberos enabled server. ...READ MORE

answered Aug 21, 2018 in Big Data Hadoop by Priyaj
• 56,200 points
163 views