Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HiveServer not starting on docker image of apache ambari. Getting Couldn't resolve host error.

Solved Go to solution

HiveServer not starting on docker image of apache ambari. Getting Couldn't resolve host error.

Explorer

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:

11947-7eh8p.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: HiveServer not starting on docker image of apache ambari. Getting Couldn't resolve host error.

Explorer

@Jay SenSharma

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.

View solution in original post

17 REPLIES 17
Highlighted

Re: HiveServer not starting on docker image of apache ambari. Getting Couldn't resolve host error.

Super Mentor

@Amit Kumar

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"

http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.2.0/bk_Installing_HDP_AMB/content/_check_dns.htm...

.

Highlighted

Re: HiveServer not starting on docker image of apache ambari. Getting Couldn't resolve host error.

Explorer

Hi,

@Jay SenSharma

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.

Highlighted

Re: HiveServer not starting on docker image of apache ambari. Getting Couldn't resolve host error.

Super Mentor

@Amit Kumar

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.

.

Highlighted

Re: HiveServer not starting on docker image of apache ambari. Getting Couldn't resolve host error.

Explorer

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!

Highlighted

Re: HiveServer not starting on docker image of apache ambari. Getting Couldn't resolve host error.

Super Mentor

@Amit Kumar

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

.

Highlighted

Re: HiveServer not starting on docker image of apache ambari. Getting Couldn't resolve host error.

Explorer

Yes, they are already existing.

Highlighted

Re: HiveServer not starting on docker image of apache ambari. Getting Couldn't resolve host error.

Super Mentor

@Amit Kumar

Please accept the answer, if this resolved your issue.

Highlighted

Re: HiveServer not starting on docker image of apache ambari. Getting Couldn't resolve host error.

Super Mentor

@Amit Kumar

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?

Highlighted

Re: HiveServer not starting on docker image of apache ambari. Getting Couldn't resolve host error.

Explorer

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.

Don't have an account?
Coming from Hortonworks? Activate your account here