Hello everyone, I am trying to form a Docker Swarm with a manager node and 2 workers. The problem is that the worker nodes do not join the swarm, and they show me the following error:
Error response from daemon: Timeout was reached before node was 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.
Mar 23 06:13:15 localhost dockerd[30120]: time=“2018-03-23T06:13:15.955019189Z” level=error msg=“failed to retrieve remote root CA certificate” error=“rpc error: code = 4 desc = context deadline exceeded” module=node
Mar 23 06:13:20 localhost dockerd[30120]: time=“2018-03-23T06:13:20.955462686Z” level=error msg=“failed to retrieve remote root CA certificate” error=“rpc error: code = 4 desc = context deadline exceeded” module=node
Mar 23 06:13:25 localhost dockerd[30120]: time=“2018-03-23T06:13:25.956006091Z” level=error msg=“failed to retrieve remote root CA certificate” error=“rpc error: code = 4 desc = context deadline exceeded” module=node
Mar 23 06:13:30 localhost dockerd[30120]: time=“2018-03-23T06:13:30.957090086Z” level=error msg=“failed to retrieve remote root CA certificate” error=“rpc error: code = 4 desc = context deadline exceeded” module=node
Mar 23 06:13:31 localhost dockerd[30120]: time=“2018-03-23T06:13:31.034087808Z” level=error msg=“Handler for POST /v1.29/swarm/join returned error: Timeout was reached before node was 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.”
Mar 23 06:13:35 localhost dockerd[30120]: time=“2018-03-23T06:13:35.958060130Z” level=error msg=“failed to retrieve remote root CA certificate” error=“rpc error: code = 4 desc = context deadline exceeded” module=node
Mar 23 06:13:35 localhost dockerd[30120]: time=“2018-03-23T06:13:35.959574057Z” level=error msg=“cluster exited with error: rpc error: code = 4 desc = context deadline exceeded”
I’m facing the same issue!
And if you try to join the node again it says that the node is already part of another swarm.
And what is more frustrating is that if you create new VMs the problem repeats.
I only opened up port 2377 on the manager node and it started working. Thanks!
Not sure what other errors I may encounter because I have not open up other ports.
BTW, I am doing this on AWS and running CentOS (Centos 7 Linux 3.10.0-1062.4.1.el7.x86_64, Docker-CE version 19.03.4). The opening and closing of ports is done via AWS Security Groups. Not through firewalld configurations.
If you are using aws for creating instances i have sloution for this error, go to ur ec2 instances in aws and select the instance and go to security and edit inbound rules and add custom tcp 2377 there and save and try this again…
I got the same error when trying to join a swarm cluster as a worker Used 2 VMs from Google cloud for this…
Manager node was working fine …docker info–> swarm did not give any errors. but when i try to join the worker nodes with the token … i got this error "Error response from daemon: Timeout was reached before 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. " while docker info showed me
“rpc error: code = DeadlineExceeded desc = context deadline exceeded in swarm error”
tried a lot of different things finally below solution worked.
solution. -->. i used “docker swarm init --force-new-cluster”. in one of the vms i tried to join the as a worker… and then i used “docker swarm leave --force” on the existing manager node … and the joined that one as a worker to the newly created cluster. Other vm also also worked when tried to join as workers for the new cluster…
I have also got the same issue while trying this on a aws cloud. After that i allowed
*** Port 2377 TCP for communication with and between manager nodes**
*** Port 7946 TCP/UDP for overlay network node discovery**
*** Port 4789 UDP (configurable) for overlay network traffic**
Then i run the command docker swarm leave and the tried and got the result. Ports are not allowed in security group that’s why i got the error when i allowed the ports then i got the results.