Back

Explore Courses Blog Tutorials Interview Questions
0 votes
4 views
in DevOps and Agile by (29.3k points)

1. I created a docker swarm in the leader machine. So, I got a command in logs that I need to run in the worker machine.so, it will be clustered with leader machine.

2. So, I copied the command and try to execute it in the worker machine. That time I am getting below error and the worker machine is not adding to swarm node.

Command

sudo docker swarm join --token SWMTKN-119fpgqx3efsilgcjay4ftx9tgs6f369sitpwmymfk4bdd8k973-82gtevzlcr53ddd5l4vsjr25s 172.31.35.188:2377


Error: Error response from daemon: Timeout was reached before the node joined. The attempt to join the swarm will continue in the background. Use the "docker info" command to see the current swarm status of your node.

Full docker info:

Client:

Debug Mode: false

Server: 

Containers: 14
Running: 2
Paused: 0
Stopped: 12
Images: 35
Server Version: 19.03.8

Storage Driver: overlay2
Backing Filesystem: <unknown>
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs

Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: error
NodeID:

Error: rpc error: code = DeadlineExceeded desc = context deadline exceeded
Is Manager: false
Node Address: 172.31.32.245

Runtimes: runc

Default Runtime: runc
Init Binary: docker-init
containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
init version: fec3683
Security Options: apparmor seccomp
Profile: default
Kernel Version: 4.15.0-1063-aws
Operating System: Ubuntu 18.04.3 LTS

OSType: linux
Architecture: x86_64

CPUs: 1
Total Memory: 983.7MiB
Name: ip-172-31-32-245
ID: P5J4:ZAEB:C6LU:PM3W:A54L:UEJT:JWOD:YUMP:6E2V:4VD6:5AXZ:3GW5
Docker Root Dir: /var/lib/docker
Debug Mode: false
Username: subrhmanyam
Registry: 
https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries: 
127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

Could you please help in resolving this issue?

1 Answer

0 votes
by (50.2k points)

This error occurs when you try to initiate the swarm using public IP try with the private IP and run that command inside node machine and make sure docker in node machine is in running state that will help you to resolve the issue.

Instead, you can directly use it without any advertising address. That will help you to connect the nodes in the cluster.

For more information, check out this Docker Tutorial.

Browse Categories

...