Docker Community Forums

Share and learn in the Docker community.

DTR install failure: Failed to connect to etcd

(Triddell) #1

I’m using RHEL 7.1, iptables (not firewalld), CS Docker Engine 1.11.2-cs4. UCP installs fine and then I successfully join three additional nodes, one which will be the DTR.

I then run the install command to install:

docker run -it --rm \
docker/dtr install \
--ucp-url https://UCP_HOSTNAME \
--ucp-node DTR_NODENAME \
--dtr-external-url DTR_IP \
--ucp-username admin \
--ucp-password SECRET_PWD \
--ucp-ca "$(cat ucp-ca.pem)"

The main error I get is:

INFO[0019] Waiting for etcd
DEBU[0019] Failed to connect to etcd: error #0: dial tcp: lookup dtr-etcd-72e0dd376179.dtr-br on no such host;

I’m not able to copy/paste from my target system to get a larger output.

Basically, it tries this connection 40 times (every 500ms), then quits with:

ERRO[0023] Couldn't set up kvStore ... client: etcd cluster unavailable or misconfigured

I’ve searched everywhere can’t find details on what would resolve. I’m about to move to Ubuntu 14.04 LTS to see if that helps. I’ve tried the entire setup with Docker Engine 1.12.1 with the same results.

Thanks for any help.

(5003152) #2

1.did you try to run the command with --debug at the end to get more info ?
2. did you enterd UCP and DTR ruls to iptables (the rules in the documentation Requirements )

(Triddell) #3
  1. Yes, I have run the command with the --debug output. I don’t have an easy way to copy the entire output but the message above
DEBU[0019] Failed to connect to etcd: error #0: dial tcp: lookup dtr-etcd-72e0dd376179.dtr-br on no such host;)

is from the debug output.

  1. I have also added all of the required ports (with a few extra I’m sure) into iptables.

(5003152) #4

so the only error you see is the etcd ?

  1. did you connect an docker engine node to UCP already ?
  2. did you install the DTR on the UCP node ?
  3. did you added first the DTR to the UCP swarm ?

(Sérgio Pelissari) #5

Hi, did you tried the DTR 2.0.2? you can use a node to host the Registry i always use this command

docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock
docker/dtr:2.0.2 install --ucp-url ucp_controller_url
–ucp-ca “$(cat ucp-ca.pem)” --ucp-username username
–ucp-password ucp password

(Triddell) #6

I just tried DTR 2.0.2 and I get the same error. I’m using one of my UCP nodes for trying to install DTR. I can’t find any other people having this same error.

(Sérgio Pelissari) #7

I had this error but when you try to install on the same node with error i received this message… try a fresh install node that you want the DTR and try it again and use the --debug option and paste here.

One more thing, if you’re trying to deploy register on the same node as role controller or replica you should have a port 443, 80 conflict.

(Triddell) #8

OK, in case others run into this, I believe this is definitely caused by a DNS issue of some type, hence the port 53 in the DEBU (debug) messages. I was able to get past this issue by using an IP address for the ucp-url parameter like:

docker run -it --rm \
docker/dtr install --ucp-url \
--ucp-ca "$(cat ucp-ca.pem)" \
--ucp-username admin \
--ucp-password MY_PWD \
--ucp-node NODE_NAME \

I’d tried many versions of dtr-external-url (shortname, ip address, fully qualified name, etc.), but using an ip address for the ucp-url worked for me. Note: I’d already switched from CentOS to Ubuntu but I believe this was needed in both cases.

(Patrick Devine) #9

We’ve been seeing this happen a bit with flakey and slow DNS servers. Do you know what /etc/resolv.conf looks like when a container gets created? If you modify the host’s resolv.conf to remove the search line, this may just work.