ianblenke / docker-ceph-dash

Dockerized ceph-dash
2 stars 1 forks source link

error: Name or service not known #1

Open CloudSide opened 8 years ago

CloudSide commented 8 years ago

I'm run :

docker run --rm --name ceph-dashboard -p 15000:5000 --volumes-from deis-store-monitor-data ianblenke/ceph-dash

but, request and response:

{
    code: 400,
    message: "rados error: error calling connect: errno EINVAL"
}

and logs:

server name not found: iZ25cyxglzdZ (Name or service not known)
unable to parse addrs in 'iZ25cyxglzdZ,iZ25pw48p7cZ,iZ25upc1oz5Z'
111.193.217.69 - - [05/Aug/2015 15:46:30] "GET / HTTP/1.1" 400 -

please help me, thanks

ianblenke commented 8 years ago

Your server names aren't resolvable. The shortes path to fixing this for your deployment would be to add the hostnames and their IP addresses to /etc/hosts in that ceph-dash container. That could be as easy as a volume mount to /etc/hosts that you create ahead of starting that container.

Hope this helps.

CloudSide commented 8 years ago

after setting my /etc/hosts file

10.251.210.227        iZ25upc1oz5Z
10.251.214.47          iZ25cyxglzdZ
10.251.211.224        iZ25upc1oz5Z

but, request and response:

server name not found: iZ25cyxglzdZ (Name or service not known)
unable to parse addrs in 'iZ25cyxglzdZ,iZ25pw48p7cZ,iZ25upc1oz5Z'

and cat the deis's /etc/ceph/ceph.conf

[global]
fsid = d3ba2109-5b15-4a51-b5fb-efdc77db5807
mon initial members = iZ25upc1oz5Z
mon host = iZ25cyxglzdZ,iZ25pw48p7cZ,iZ25upc1oz5Z
mon addr = 10.251.210.227:6789,10.251.211.224:6789,10.251.214.47:6789
mon pg warn max per osd = 1536
auth cluster required = cephx
auth service required = cephx
auth client required = cephx
osd pool default size = 3
osd pool default min_size = 1
osd pool default pg_num = 64
osd pool default pgp_num = 64
osd recovery delay start = 15
log file = /dev/stdout
rgw_frontends = "civetweb port=8888"
rgw_thread_pool_size = 512

[client.radosgw.gateway]
host = deis-store-gateway
keyring = /etc/ceph/ceph.client.radosgw.keyring
rgw socket path = /var/run/ceph/ceph.radosgw.gateway.fastcgi.sock
ianblenke commented 8 years ago

Note that your container's /etc/hosts file is different than your underlying docker hosts' /etc/hosts file.

I'm betting that you added the host names to your docker host, and your docker containers have no way of resolving them.