Support Questions
Find answers, ask questions, and share your expertise

Namenode could not be resolved by DNS

Highlighted

Namenode could not be resolved by DNS

Explorer

raise WebHDFSCallException(err_msg, result_dict)
resource_management.libraries.providers.hdfs_resource.WebHDFSCallException: Execution of 'curl -sS -L -w '%{http_code}' -X PUT -d '' -H 'Content-Length: 0' 'http://thdfc-master-01:50070/webhdfs/v1/services/sync/yarn?op=MKDIRS&user.name=hdfs'' returned status_code=404.
<HTML><HEAD>
<TITLE>DNS Error</TITLE>
</HEAD>
<BODY>
<center>
<p><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<img src="http://www.thdf.com/graphics/dhs_logo.gif" alt="THS Logo" />
<FONT face="Helvetica"
<big><strong></strong></big><BR>
</FONT>
<blockquote>
<TABLE border=0 cellPadding=1 width="80%">
<TR><TD>
<center>
<FONT face="Helvetica">
<big>DNS Error (dns_unresolved_hostname)</big>
<BR>
<BR>
</FONT>
</TD></TR>
<center>
<TR><TD>
<center>
<FONT face="Helvetica">
<p>
Your requested host "thdfc-master-01" could not be resolved by DNS. Please make sure you typed the URL correctly.
<p>

2 REPLIES 2

Re: Namenode could not be resolved by DNS

Explorer
[hdfs@thdfc-master-01 hdfs]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
10.115.36.107   thdfc-master-01 
10.115.36.87    thdfc-edge-01   
10.115.36.47    thdfc-master-02
10.115.36.52    thdfc-slave-01  
10.115.36.28    thdfc-slave-02  
10.115.36.20    thdfc-slave-03 
Highlighted

Re: Namenode could not be resolved by DNS

Super Mentor

@kwabstian53 

All your cluster nodes should be able to resolve each other including the ambari server host.

So please make sure that you have identical setting in all the cluster nodes inside the "/etc/hosts" file.

 

Also please make sure that when you run the following command then it returns the correct Fully Qualified Hostname on all cluster nodes and every node in cluster should be able to resolve each other using their FQDN

 

# hostname -f

 

 
https://docs.hortonworks.com/HDPDocuments/Ambari-2.7.3.0/bk_ambari-installation-ppc/content/edit_the...

https://docs.hortonworks.com/HDPDocuments/Ambari-2.7.3.0/bk_ambari-installation-ppc/content/check_dn...

Additionally please check what is the setting inside your nsswitch file like:

# grep host /etc/nsswitch.conf
 hosts: files dns

.