Created on 02-01-2017 07:44 AM - edited 08-18-2019 05:25 AM
Hi,
While starting Hiveserver2 in apache ambari, I'm getting "Couldn't resolve host" issue.
My ambari setup is a docker image having 3 clusters.
I can see that, as part to resolve the host it is taking the docker container name followed by the port no. I completely doubt if that is going to work.
http://16aadcc9c315:50070 not sure why it is like this.
16aadcc9c315 is the name of one of my cluster which is a docker image.
Any input on this will be appreciable?
Below is the error in logs file:
Created 02-03-2017 05:12 AM
I was able to fix this by adding the hostname and ip of every cluster in /etc/hosts. I was able to ping after that with the hostname. This worked for me.
All thanks for the input.
Created 02-01-2017 07:57 AM
Have you configured the FQDN properly for all your hosts and are they able to access each other using the FQDN?
Following command should show the hostname it should use.
hostname -f
Please see the following link to know why correct FQDN configuration is needed for communication and how to edit the "/etc/hosts"
.
Created 02-01-2017 08:56 AM
Hi,
Below are the details in /etc/hosts in my 3 clusters.
##################################
127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 172.20.0.2 8c043e0d490c
################################
127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 172.20.0.3 16aadcc9c315
##################################
127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 172.20.0.4 b1ec39e6d58b
#################################
hostname -f shows the name of my container ID for each cluster.
Created 02-01-2017 09:03 AM
Do you have the following entries mentioned in all your "/etc/hosts" file
172.20.0.2 8c043e0d490c 172.20.0.3 16aadcc9c315 172.20.0.4 b1ec39e6d58b
.
After the first two lines of the /etc/hosts file every node of your cluster should have the IP host name mapping. So that they can ping each other using the mentioned hostname. Means each host should be able to access each other with the mentioned hostnames.
.
Created 02-01-2017 09:11 AM
Hi,
I'm able to ping every node via IP. But with hostname it gives error.
[root@8c043e0d490c /]# ping 16aadcc9c315 ping: unknown host 16aadcc9c315
Thanks!
Created 02-01-2017 09:15 AM
Have you already added the follwing 3 lines of entries in *every hosts* "/etc/hosts" file? And then tried Pinging?
172.20.0.2 8c043e0d490c 172.20.0.3 16aadcc9c315 172.20.0.4 b1ec39e6d58b
Created 02-01-2017 09:17 AM
Yes, they are already existing.
Created 02-03-2017 05:14 AM
Created 02-01-2017 09:24 AM
It is good that we have isolated the issue that the hosts are not able to even ping each other means the Host name is not resolvable. That's why you are getting the following error even after addign the /etc/hosts entries.
[root@8c043e0d490c /]# ping 16aadcc9c315 ping: unknown host 16aadcc9c315
- So it looks like more of a Docker N/W config issue.
- Can you please share more details about how did you configure your docker N/W Settings?
Created 02-01-2017 10:06 AM
It was an ambari image I pulled from docker hub. Did nothing specific to N/W setting for docker. I just turned off my firewall on every node which in turn didn't allow me to ping google.