confd: Confd giving a 501 peers not reachable single node etcd

I am running confd in a docker container, with the docker host running etcd. I am able to get values from etcdctl as well as curl, but confd gives the 501: All the given peers are not reachable. Bash script (for testing) running inside the container:

#!/bin/bash
/usr/global/apps/etcdctl --no-sync -peers http://172.17.42.1:4001 ls system/zookeeper
echo "curl test: " $(curl -X GET http://172.17.42.1:4001/v2/keys/system/zookeeper?consistent=true&recursive=false&sorted=false)
/usr/global/apps/confd -onetime=true -verbose=true -debug=true -node="172.17.42.1:4001" -confdir=/usr/global/config/shared/zookeeper/confd/

And here is the output I am getting:

/system/zookeeper/zookeeper-1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   294    0   294    0     0   169k      0 --:--:-- --:--:-- --:--:--  287k
test:  {"action":"get","node":{"key":"/system/zookeeper","dir":true,"nodes":[{"key":"/system/zookeeper/zookeeper-1","value":"{\"id\":\"1\",\"ip\":\"10.1.51.252\",\"cport\":\"49153\",\"pport\":\"49154\",\"lport\":\"49155\"}","modifiedIndex":30,"createdIndex":30}],"modifiedIndex":29,"createdIndex":29}}
2014-10-15T12:54:51-04:00 78d09c06c9fc /usr/global/apps/confd[16]: WARNING Skipping confd config file.
2014-10-15T12:54:51-04:00 78d09c06c9fc /usr/global/apps/confd[16]: NOTICE Backend set to etcd
2014-10-15T12:54:51-04:00 78d09c06c9fc /usr/global/apps/confd[16]: NOTICE Starting confd
2014-10-15T12:54:51-04:00 78d09c06c9fc /usr/global/apps/confd[16]: NOTICE Backend nodes set to 172.17.42.1:4001
2014-10-15T12:54:51-04:00 78d09c06c9fc /usr/global/apps/confd[16]: DEBUG Loading template resources from confdir /usr/global/config/shared/zookeeper/confd/
2014-10-15T12:54:51-04:00 78d09c06c9fc /usr/global/apps/confd[16]: DEBUG Processing template resource /usr/global/config/shared/zookeeper/confd/conf.d/zookeeperconf.toml
2014-10-15T12:54:51-04:00 78d09c06c9fc /usr/global/apps/confd[16]: DEBUG Loading template resource from /usr/global/config/shared/zookeeper/confd/conf.d/zookeeperconf.toml
2014-10-15T12:54:51-04:00 78d09c06c9fc /usr/global/apps/confd[16]: ERROR 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
2014-10-15T12:54:51-04:00 78d09c06c9fc /usr/global/apps/confd[16]: DEBUG Retrieving keys from store
2014-10-15T12:54:51-04:00 78d09c06c9fc /usr/global/apps/confd[16]: DEBUG Key prefix set to /

The top two lines show the correct ip and port are being used (unlike https://github.com/kelseyhightower/confd/issues/130) versions: etcd version 0.4.5 etcdctl version 0.4.5 confd 0.6.3

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 27 (3 by maintainers)

Commits related to this issue

Most upvoted comments

Changing “-advertise-client-urls” from http://0.0.0.0:4001 to http://etcd-server-ip-address:4001 have solved the problem of confd connecting to this remote etcd and giving me “dial tcp 0.0.0.0:4001: connection refused”.