Docker Community Forums

Share and learn in the Docker community.

Setup a swarm - client not registering

(Jeanluca) #1

I’m trying to setup a Swarm with my Mac being the manger and my Fedora server a node agent.

I must admint that the docs are pretty good but has some gaps where I’ve might gone wrong. Here is what I did to setup the swarm

Here is what I did on my Fedora machine (ip=

$fedora> docker run --rm swarm create
$fedora> docker run -d swarm join --addr= token:7b48216c28....

Next (ip=

$Mac> docker run --rm swarm create
$Mac> docker run -d -p 2375:2375 swarm manage token:5e21aa753
$Mac>  docker -H tcp://localhost:2375 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: 1
 (unknown): token:5e21aa753...
  └ ID: 
  └ Status: Pending
  └ Containers: 0
  └ Reserved CPUs: 0 / 0
  └ Reserved Memory: 0 B / 0 B
  └ Labels: 
  └ UpdatedAt: 2016-10-18T20:10:14Z
  └ ServerVersion: 
  Is Manager: false
 Node Address: 
Security Options:
Kernel Version: 4.4.24-moby
Operating System: linux
Architecture: amd64
CPUs: 0
Total Memory: 0 B
Name: 5519b2e29e21
Docker Root Dir: 
Debug Mode (client): false
Debug Mode (server): false
No Proxy: *.local, 169.254/16
WARNING: No kernel memory limit support

From this I get the idea that the client (Fedora machine) doesn’t connect. I’ve tried to replace the ip address to the Mac ip but that didn’t help. Any help would be appreciated

(Abrahamjaison) #2

I see that you have created two swarm clusters. You only need to issue the
docker run --rm swarm create on one machine.
It seems that you have created a swarm token on both of the machines (mac and fedora).
In the mac machine, you can avoid the swarm create command and directly run
docker run -d -p 2375:2375 swarm manage token://<token_generated_from_fedora>
I hope that should work…

(Jeanluca) #3

Thanks a lot for the reply. Note that I want to have the manger run on my Mac. I still can’t figure out how to get this up and running, so will do this now step-by-step. I’ve posted the follow-up question here Cheers