title: docker swarm - etcd cluster is unavailable or misconfigured
body: <p>I'm trying to get started with docker swarm using etcd for the <a href="https://docs.docker.com/swarm/discovery/" rel="nofollow">discovery backend</a>. My etcd server is at etcd.programster.org (10.1.0.44) whilst my docker node is at swarm1.programster.org (10.1.0.47). All machines are running on Virtualbox instances on my local network (10.1.0.x).</p>
  
  <p>I manage to get my etcd server running with the following:</p>
  
  <pre><code>MY_IP="10.1.0.44"
  
  ./etcd \
  -name infra0 \
  -initial-advertise-peer-urls http://$MY_IP:2380 \
  -listen-peer-urls="http://0.0.0.0:2380,http://0.0.0.0:7001" \
  -listen-client-urls="http://0.0.0.0:2379,http://0.0.0.0:4001" \
  -advertise-client-urls="http://$MY_IP:2379" \
  -initial-cluster-token etcd-cluster-1 \
  -initial-cluster infra0=http://$MY_IP:2380 \
  -initial-cluster-state new
  </code></pre>
  
  <p>I can set and retrieve key values from swarm1.programster.org just fine with curl and etcd. </p>
  
  <pre><code># setting key with etcdctl
  ./etcdctl --peers http://etcd.programster.org:4001 set etc://etcd.programster.org/mykey "test"
  
  # setting key with curl
  curl -L \
  http://etcd.programster.org:4001/v2/keys/mykey \
  -XPUT -d value="test"
  
  # retrieving key with etcdctl
  ./etcdctl --peers http://etcd.programster.org:4001 get etc://etcd.programster.org/mykey
  
  # retrieving key with curl
  curl -L http://etcd.programster.org:4001/v2/keys/mykey
  </code></pre>
  
  <p>However, whenever I run a swarm based command such as:</p>
  
  <pre><code>docker run swarm list etcd://10.1.0.44/
  </code></pre>
  
  <p>or </p>
  
  <pre><code>docker run swarm join --advertise=10.1.0.47:2375 etcd://10.1.0.44/
  </code></pre>
  
  <p>I always get the following error message:</p>
  
  <pre><code>[timestamp] client: etcd cluster is unavailable or misconfigured
  </code></pre>
  
  <p>Have I configured my etcd server incorrectly or perhaps there is a networking configuration that I need to perform on the docker node first? I have not performed any TLS authentication yet for simplicity but perhaps swarm will not work without this?</p>
  
  <h2>Context</h2>
  
  <ul>
  <li>All machines are running Debian 8 (3.16.0-4-amd64). Also tested with Ubuntu 14.04 for swarm1.programster.org.</li>
  <li>Docker version 1.9.1, build a34a1d5</li>
  <li>etcd version 2.2.2</li>
  </ul>