Support Questions

Find answers, ask questions, and share your expertise

What's the best practice for hostname for Ambari Managed Cluster

avatar
Explorer

Hi,

I'm trying to install a small HDP cluster on AWS EC2. It's working fine as expected except one painful issue related to hostname.

In my /etc/hosts, I have this (example):

10.0.0.1 hdpmaster.emp.net hdpmaster ip-10-0-0-1.compute.internal
10.0.0.2 hdprm.emp.net hdprm ip-10-0-0-2.compute.internal
10.0.0.3 hdp1.emp.net hdp1 ip-10-0-0-3.compute.internal
10.0.0.4 hdp2.emp.net hdp2 ip-10-0-0-4.compute.internal

I used this when setting up my cluster through Ambari:

hdpmaster.emp.net
hdprm.emp.net
hdp1.emp.net
hdp2.emp.net

All services are running as expected but I need to change URL every time if I want to browse them. Ambari is redirecting everything based on the hostname (which is expected), but is there any way not to get the actual IP address on the redirect link instead of the hostname?

For example:

I get this to track an app (RM):

http://hdprm.emp.net:8088/cluster/app/application_1466120609594_0002

Unless I change that to this, I'm unable to browse it:

http://10.0.0.2:8088/cluster/app/application_1466120609594_0002

I do not want to assign elastic public IP to each of those machines (not feasible) and use public dns name during installation, so what I can do for private IP address? Did I miss something? Or I need to use some browser plug-in to redirect to the expected url? Or I need to use the exact IP address (10.0.0.2) during installation from Ambari?

Thanks in advance.

1 ACCEPTED SOLUTION

avatar
Master Guru

@Chokroma Tusira

I believe you are hitting this issue since the machine you are accessing the DNS does not recognize the it. You can route hdprm.emp.net to an existing DHCP servers (info here). Or you can modify the etc/host file on your machine to route hdprm.emp.net to 10.0.0.2. However this is with caveat you have direct connect setup to use that CIDR chuck which will route you to the correct ip. Lastly you can setup a DNS through route53. Then the domain *.emp.net will route to the ip you have assign to your 10.x addresses.

View solution in original post

3 REPLIES 3

avatar
Master Guru

@Chokroma Tusira

I believe you are hitting this issue since the machine you are accessing the DNS does not recognize the it. You can route hdprm.emp.net to an existing DHCP servers (info here). Or you can modify the etc/host file on your machine to route hdprm.emp.net to 10.0.0.2. However this is with caveat you have direct connect setup to use that CIDR chuck which will route you to the correct ip. Lastly you can setup a DNS through route53. Then the domain *.emp.net will route to the ip you have assign to your 10.x addresses.

avatar
Master Guru

To make it very simple. the domain emp.net you are using is not recognized by AWS. AWS is trying to resolve the DNS but can't find it from the DNS authority. If it is a internal domain then hook up via DHCP or create a domain on route53 for *emp.net.

avatar
Explorer

Thanks @Sunile Manjee for the details, now got pretty good idea of what's going on there. I will look those options.