Docker Community Forums

Share and learn in the Docker community.

Docker Swarm Node Status Down


(Xoron) #1

hi. so i am trying to set up a docker swarm and they seem to have connected but when i deploy a service with the following command, i was expecting the services to be distributed between 2 nodes.

sudo docker service create --name my_web \
                        --replicas 6 \
                        --publish published=8080,target=80 \
                        nginx

but when i run the following command, i get the following response:
sudo docker service ps my_web

it shows that all the service replicas are on the master node. and when i run the following command, i get the response:
sudo docker node ls

ID                            HOSTNAME            STATUS              AVAILABILITY        MANAGER STATUS
txd59uxjwe9eulo7qx6yrginn *   node00              Ready               Active              Leader
mbb4rbyrghzxbdf9g4f5pxgmp     node01              Down                Active  

it shows that node01’s AVAILABILITY is Active, but the STATUS is Down.

does anyone know what could be causing this issue. i am new to docker swarm so any help is appreciated.


(Emily Shepherd) #2

Hiya,

“Down” just means that the node isn’t reachable for some reason - it shouldn’t have anything to do with that specific service you started, it’ll be a larger problem of inter connectivity between the nodes.

A couple of things to check:

Are you able to ping it from node00?

If you access node01, can you confirm that the docker daemon is still running?


(Xoron) #3

i restarted both nodes and left the swarm and created a new swarm. it looks like it is working now.


(Banrieen) #4

I have to nodes, they can ping success to each other, and the docker daemon is running,:

[arch@Arch ~]$ sudo docker info
Containers: 3
Running: 0
Paused: 0
Stopped: 3
Images: 10
Server Version: 17.06.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfb82a876ecc11b5ca0977d1733adbe58599088a
runc version: 2d41c047c83e09a6d61d464906feb2a2f3c52aa4
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.12.4-1-ARCH
Operating System: Arch Linux
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 492.6MiB
Name: Arch
ID: ARQ2:2IIU:CETC:3NOJ:MR5M:47UJ:RGPD:UEWU:Q4PL:KGGM:ZGTM:KXI3
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: banrieen
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Registry Mirrors:
https://docker.mirrors.ustc.edu.cn/
Live Restore Enabled: false

But the swarm node manager still show the node status is down

docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
ar3wya9cqq5oscxqzjnjo634i Arch Down Active
iuvxaxszfretqvpv14z2rz5df * bogon Ready Active Leader