hi @Ayman
Can you please create a seperate thread “Docker Swarm” so that we can post all issues related to Docker swarm under that thread ? Currently the thread I am able to see is “Docker for beginners”.
Anyway This is wrt Docker Swarm : Labs : Docker service Task 02 Failing
Can you please go through below outputs and let me know why the checks are failing in below attempt ? I have included all necessary outputs for your kind analysis.
==================================
Question
Let’s initialize a swarm cluster on the node master
, once done add node01
to the cluster
you can ssh to node01
from master
node
CHECK
- info_outline Hint
run docker swarm init
===================================
Checks
-
Tasks not completed!
-
node master is the leader?
-
node01 joined swarm as a worker?
===================================
Terminal Output
node01 $
node01 $ docker swarm join --token SWMTKN-1-3wbn6cuxhzz5gxnxsqmecwfrso15ll6pck04r44enszl2d5b8b-ckwrwxwsxplimmo4pqoov3w2s 172.17.0.36:2377
This node joined a swarm as a worker.
node01 $exit
master $ docker node lsID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
biaj19oh7dvgewcvcooqdedex node01 Ready Activelyau67dhohblb2aonhqi66qh2 * master Ready Active Leader
master $master
$ docker node inspect bi
[ {
“ID”: “biaj19oh7dvgewcvcooqdedex”, “Version”: {
“Index”: 15 },
“CreatedAt”: “2020-06-23T18:19:37.880130684Z”, “UpdatedAt”: “2020-06-23T18:19:38.528486062Z”,
“Spec”: {
“Role”: “worker”,
“Availability”: “active”
},
“Description”: {
“Hostname”: “node01”,
“Platform”: {
“Architecture”: “x86_64”,
“OS”: “linux”
},
“Resources”: {
“NanoCPUs”: 4000000000,
“MemoryBytes”: 4143312896
},
“Engine”: {
“EngineVersion”: “1.13.1”,
“Plugins”: [
{
“Type”: “Network”,
“Name”: “bridge”
},
{
“Type”: “Network”,
“Name”: “host”
},
{
“Type”: “Network”,
“Name”: “macvlan”
},
{
“Type”: “Network”,
“Name”: “null”
},
{
“Type”: “Network”,
“Name”: “overlay”
},
{
“Type”: “Volume”,
“Name”: “local”
}
]
}
},
“Status”: {
“State”: “ready”,
“Addr”: “172.17.0.41”
}
}
]
master $
master $ docker node inspect ly
[
{
“ID”: “lyau67dhohblb2aonhqi66qh2”,
“Version”: {
“Index”: 9
},
“CreatedAt”: “2020-06-23T18:17:19.388870316Z”,
“UpdatedAt”: “2020-06-23T18:17:19.991820387Z”,
“Spec”: {
“Role”: “manager”,
“Availability”: “active”
},
“Description”: {
“Hostname”: “master”,
“Platform”: {
“Architecture”: “x86_64”,
“OS”: “linux”
},
“Resources”: {
“NanoCPUs”: 4000000000,
“MemoryBytes”: 2097025024
},
“Engine”: {
“EngineVersion”: “1.13.1”,
“Plugins”: [
{
“Type”: “Network”,
“Name”: “bridge”
},
{
“Type”: “Network”,
“Name”: “host”
},
{
“Type”: “Network”,
“Name”: “macvlan”
},
{
“Type”: “Network”,
“Name”: “null”
},
{
“Type”: “Network”,
“Name”: “overlay”
},
{
“Type”: “Volume”,
“Name”: “local”
}
]
}
},
“Status”: {
“State”: “ready”,
“Addr”: “127.0.0.1”
},
“ManagerStatus”: {
“Leader”: true,
“Reachability”: “reachable”,
“Addr”: “172.17.0.36:2377”
}
}
]
master $ docker swarm init
Error response from daemon: This node is already part of a swarm. Use “docker swarm leave” to leave this swarm and join another one.
master $