Docker Community Forums

Share and learn in the Docker community.

Docker Swarm Issues

(Opsvision) #1

I’m seeing some strange behavior with a docker swarm. I’m using consul for discovery and can see all the nodes (using consul members and swarm list); however, from the manager I only see one node in the swarm (swarm info). if I restart the swarm, sometimes it is the same node, sometimes it is a different node, but it is always just a single node. Any ideas? Here’s some output to illustrate the issue.

docker run --rm swarm list consul://

docker -H tcp:// info

Nodes: 1
└ Containers: 1
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 1.887 GiB
└ Labels: executiondriver=native-0.2, kernelversion=3.10.0-229.el7.x86_64, operatingsystem=CentOS Linux 7 (Core), storagedriver=devicemapper
CPUs: 1
Total Memory: 1.887 GiB

(Opsvision) #2

I think I figured it out. The Docker nodes were all copies of the same virtual machine that had already started Docker before cloning, which ended up creating the same Docker ID in /etc/docker/key.json. I stopped Docker, removed the key file, and then restarted so each daemon would create a new key file.