Docker Community Forums

Share and learn in the Docker community.

Node not joining master

(Stephen Lawrence) #1

I ran through the installation instructions but for some reason my additional node is not joining. When I visit the Dashboard it only shows 1 node.

Here are the commands I used:

docker-machine create -d virtualbox --virtualbox-memory “2049” orcamaster
docker-machine env orcamaster
eval “$(docker-machine env orcamaster)”

docker run --rm -it --name ucp
-v /var/run/docker.sock:/var/run/docker.sock
dockerorca/ucp install
–swarm-port $SWARM_PORT

docker-machine create -d virtualbox --virtualbox-memory “2049” orcaslave
dm env orcaslave
eval "$(docker-machine env orcaslave)"
docker run --rm -it --name ucp
-v /var/run/docker.sock:/var/run/docker.sock
dockerorca/ucp join
–swarm-port $SWARM_PORT

Main Screen 1 node but 4 are connected
(Banjot) #2

Can you send the output after you ran the commands above? Were they successful?

have you checked your logs on the ucp-swarm-join or ucp-swarm-manager containers running on the master node?
docker logs ucp-swarm-join
docker logs ucp-swarm-manager

One item to note is that docker running on each swarm node must have a unique docker ID. If you cloned the VM running docker, swarm may not be able to distinguish between the master and the node and will show a node count =1 because both nodes have the same ID. You can check this by running docker info on each node and compare the output on the line


To change the ID, remove the file
and then restart your docker daemon on the secondary node.

(Rajgw) #3

I too had the same problem and your suggestion of removing key.json file and rebooting the docker daemon resolved the problem for me.

(Dadoherty) #4

I too have this same problem. Is there any way to change that id from the vagrant file? I have a single Vagrant file that starts all 3 of my hosts for me.

(Dadoherty) #5

I used this to do it from the vagrantfile in a script that runs always

rm -f /etc/docker/key.json
/etc/init.d/docker restart

However, I am concerned as to what will happen if the vms get shut down and then restarted. Will UCP still work if the docker ID has changed?

(Dadoherty) #6

I still cannot see the second node when after I connect to it. I notice that UCP is using eth0 as its main network interface. Since that ip is the same on both of my ducp machines, I cannot get the node to talk to the master, even though I have given them another ip address on eth1. Is there a way to tell UCP to use a specific network interface? I would like to use eth1 as the ip addresses are different for the ducp1 and ducp2 vagrant boxes.

(Dadoherty) #7

solved it. My apologies. I had both configuration and network problems here that prevented this from working. My public network in vagrant was configured wrong. and my laptop was on a different subnet because of my wifi router. It is all working now.