title: swarm manager does not connect to nodes' docker daemons on AWS
body: <p>I'm trying to configure on AWS a docker swarm example.</p>
  
  <p>I have three machines: two nodes and on manager, created by using docker-machine:</p>
  
  <pre><code>docker-machine create --driver amazonec2 --amazonec2-region eu-central-1 swarm-manager
  docker-machine create --driver amazonec2 --amazonec2-region eu-central-1 docker1
  docker-machine create --driver amazonec2 --amazonec2-region eu-central-1 docker2
  </code></pre>
  
  <p>I set up <code>docker1</code> and 2 like this:</p>
  
  <p>set up /etc/default/docker:</p>
  
  <pre><code>DOCKER_OPTS="-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"
  </code></pre>
  
  <p>rebooted docker and then:</p>
  
  <p><code>sudo docker run -d swarm join --addr=172.31.5.27:2375 token://&lt;token&gt;</code></p>
  
  <p>and checked it:</p>
  
  <pre><code>ubuntu@docker1:~$ sudo docker ps
  CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
  a4ae06e827a6        swarm               "/swarm join --addr=1"   28 minutes ago      Up 28 minutes       2375/tcp            admiring_blackwell
  </code></pre>
  
  <p>on the swarm machine:</p>
  
  <pre><code>sudo docker run -dP swarm manage token://
  </code></pre>
  
  <p>and I added my nodes:</p>
  
  <pre><code>ubuntu@swarm-manager:~$ sudo docker ps
  CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                     NAMES
  67f55fda2eba        swarm               "/swarm manage token:"   16 minutes ago      Up 16 minutes       0.0.0.0:32768-&gt;2375/tcp   trusting_dijkstra
  
  ubuntu@swarm-manager:~$ docker -H tcp://127.0.0.1:32768 info
  Containers: 0
   Running: 0
   Paused: 0
   Stopped: 0
  Images: 0
  Server Version: swarm/1.2.5
  Role: primary
  Strategy: spread
  Filters: health, port, containerslots, dependency, affinity, constraint
  Nodes: 2
   (unknown): 172.31.11.143:2375
    └ ID:
    └ Status: Pending
    └ Containers: 0
    └ Reserved CPUs: 0 / 0
    └ Reserved Memory: 0 B / 0 B
    └ Labels:
    └ Error: Cannot connect to the Docker daemon. Is the docker daemon running on this host?
    └ UpdatedAt: 2016-10-29T16:34:28Z
    └ ServerVersion:
   (unknown): 172.31.5.27:2375
    └ ID:
    └ Status: Pending
    └ Containers: 0
    └ Reserved CPUs: 0 / 0
    └ Reserved Memory: 0 B / 0 B
    └ Labels:
    └ Error: Cannot connect to the Docker daemon. Is the docker daemon running on this host?
    └ UpdatedAt: 2016-10-29T16:34:38Z
    └ ServerVersion:
  Plugins:
   Volume:
   Network:
  Swarm:
   NodeID:
   Is Manager: false
   Node Address:
  Security Options:
  Kernel Version: 4.2.0-18-generic
  Operating System: linux
  Architecture: amd64
  CPUs: 0
  Total Memory: 0 B
  Name: 67f55fda2eba
  Docker Root Dir:
  Debug Mode (client): false
  Debug Mode (server): false
  WARNING: No kernel memory limit support
  </code></pre>
  
  <p>I can't undersrtand why imy nodes are still pending. The private IPs I used seem to be  correct, plus the two nodes are listes. Any hint?</p>