Skip to content

ambari in container cannot use DNS server #88

Open
@qinzhaokun

Description

@qinzhaokun

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions