Reply
New Contributor
Posts: 7
Registered: ‎04-21-2014

How to configure amazon ec2 instance so that DNS lookup works

I'm following the installation guide at http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH5/latest/CDH5-Installation-Guide/c... My instances are on amazon ec2 and have ubuntu 12.04 installed.

Here it says that the DNS lookup using 'host -v -t A `hostname`' should should resolve to an ip address. But I'm not able to get the hostname mapped to an ip address.

my /etc/hosts file has the FQDN and /etc/hostname file has the hostname. The hostname, hostname -f, hostname -d commands work fine. 'ping' is able to resolve the ip from hostname and FQDN but 'host' or 'nslookup' commands do not work. How do I fix this?

Posts: 1,903
Kudos: 435
Solutions: 307
Registered: ‎07-31-2013

Re: How to configure amazon ec2 instance so that DNS lookup works

It is not terribly important to make the DNS work if you prefer using the /etc/hosts approach.

However, if you still wish it to work, you will need to implement a DNS server, such as BIND 9, on one of your nodes and have the others use it.