Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ambari in container cannot use DNS server #88

Open
qinzhaokun opened this issue Oct 29, 2015 · 2 comments
Open

ambari in container cannot use DNS server #88

qinzhaokun opened this issue Oct 29, 2015 · 2 comments

Comments

@qinzhaokun
Copy link

I am working with ambari 1.7.0 and using ambari functions to start containers.

root@zqin:/home/zqin/Desktop/ambari-1.7.0# source ambari-functions
root@zqin:/home/zqin/Desktop/ambari-1.7.0# amb-deploy-cluster 3
starting an ambari cluster with: 3 nodes
[DEBUG] docker run -d --dns 127.0.0.1 --entrypoint /usr/local/serf/bin/start-serf-agent.sh -e KEYCHAIN= --name amb0 -h amb0.mycorp.kom sequenceiq/ambari:1.7.0 --tag ambari-server=true
WARNING: Localhost DNS setting (--dns=127.0.0.1) may fail in containers.
4c549361f6a69f1330efcd8c924fa553a22c9fea7dbc78f81f6ac8fd8a71f14b
[DEBUG] docker run -d -e SERF_JOIN_IP=172.17.0.1 --dns 127.0.0.1 --entrypoint /usr/local/serf/bin/start-serf-agent.sh -e KEYCHAIN= --name amb1 -h amb1.mycorp.kom sequenceiq/ambari:1.7.0 --log-level debug

and I find a warning like:WARNING: Localhost DNS setting (--dns=127.0.0.1) may fail in containers.

I use ubuntu in VM virtual box. When the installation completes, I can visit 172.17.0.1:8080 and ambari web UI can be shown.

However, I go into container amb0 and find ambari-server is not running. And the container cannot resolve any host like below:
bash-4.1# ping google.com
ping: unknown host google.com

Any when I check ambari server , it tells me it is not running like this:
bash-4.1# ambari-server status
Using python /usr/bin/python2.6
Ambari-server status
Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid

Is the dns problem or other issues?

@lalyos
Copy link
Contributor

lalyos commented Oct 29, 2015

Could you please elaborate on which branch, or tag are you using? As master is already amber 2.1.0

@qinzhaokun
Copy link
Author

Hi @lalyos
the latest version also have the same problem. Checking ambari-server status, it shows not running.
And since the container cannot resolve any host name, the any url in the container fail :
ambari-shell>blueprint add --url https://raw.githubusercontent.com/sequenceiq/ambari-rest-client/2.1.11/src/main/resources/blueprints/multi-node-hdfs-yarn
No blueprint specified
ambari-shell>blueprint add --url https://raw.githubusercontent.com/sequenceiq/ambari-rest-client/2.1.11/src/main/resources/blueprints/single-node-hdfs-yarn
No blueprint specified
ambari-shell>cluster build --blueprint multi-node-hdfs-yarn
Command 'cluster build --blueprint multi-node-hdfs-yarn' was found but is not currently available (type 'help' then ENTER to learn about this command)
ambari-shell>cluster autoAssign
Command 'cluster autoAssign' was found but is not currently available (type 'help' then ENTER to learn about this command)
ambari-shell>cluster create --exitOnFinish true
Command 'cluster create --exitOnFinish true' was found but is not currently available (type 'help' then ENTER to learn about this command)

it cannot create any cluster in container and the ambari-server is not running at all.

it is the dns problem or other issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants