Support Questions

Find answers, ask questions, and share your expertise

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

avatar
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

avatar
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

avatar
Explorer

My Bad, I cloned it from github. Below is the link.

https://github.com/weiqingy/caochong

avatar
Master Mentor

@Amit Kumar

Not sure if there is anything special in the above mentioned docker instance.

However if you would like to see Ambari's Docker instance / instructions then you might want to look at:

https://cwiki.apache.org/confluence/display/AMBARI/Development+in+Docker

https://github.com/apache/ambari/tree/trunk/dev-support/docker

And

https://github.com/sequenceiq/docker-ambari The above Github repo has more contributors and more Commits. This worked for me many times.

avatar
Explorer

So no way to resolve this issue of unknown host name?

avatar
Master Mentor

@Amit Kumar It will be more of troubleshooting docker based n/w config. We may need to look from the docker side much... compared to ambari/hive side.

avatar
Explorer

Agreed! I'll check for the images provided by you. All thanks!

avatar
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.

avatar
Master Mentor

@Amit Kumar

How did you add the entries in the "/etc/hosts" file something like below ... or in a different way ? AS we already discussed about it .... and i though it did not work for you?

172.20.0.2   8c043e0d490c
172.20.0.3   16aadcc9c315
172.20.0.4   b1ec39e6d58b

avatar
Explorer

Yes, it is the same way you mentioned.

I think, I misinterpreted you response and responded wrongly. For each cluster, there were only one entry. I added rest of the two.