Docker Swarm cluster missing nodes

While creating a Docker Swarm cluster; only one node would ever join. Looking at the logs of the Swarm manager revealed an error that each node had an ID that was already used by the node currently in the cluster.

time="2015-05-05T11:39:33Z" level=error msg="ID duplicated. AGM4:Z2ZA:NQW3:ZQ9K:IX34:JQJ1:SCAO:ECQL:PY4W:JVC3:C1YB:RZT6 shared by and" 

When Docker starts it creates a trust key, which is then used to get an ID for the Docker daemon. You can find yours with:

$ docker info | grep ID

The problem occured due to a cloned VM image (with Docker and Swarm already installed) being used for each node.

The solution was simple; getting Docker to generated a new trust key on each of the nodes.

Delete the file /etc/docker/key.json and then restart Docker.

Adam Bell-Hanssen

maybe, someday .. just another code and ops guy

Oslo, Norway