Docker Swarm Error response from daemon: RPC error: code
Once you install the docker-ce on the worker machine. You might be facing these issues “Docker Swarm Error response from daemon: RPC error: code = 14 desc = grpc: the connection is unavailable”. Docker swarm not working and find port numbers to add in the firewall.
Docker swarm might be not working because you need to add ports to communicate between manager and worker nodes in the Docker swarm cluster. I tried by disabling the firewall but it didn’t work. It’s better to add ports to the firewall rules.
You must have been configured the docker swarm cluster on the master node.
Note: TCP port 2377 for cluster Management communications TCP
& UDP port 7946 for communication among nodes UDP port 4789 for overlay network traffic.
This is because you might need to add the following ports in the firewall rules.
firewall-cmd --add-port=2376/tcp --permanent firewall-cmd --add-port=2377/tcp --permanent firewall-cmd --add-port=7946/tcp --permanent firewall-cmd --add-port=7946/udp --permanent firewall-cmd --add-port=4789/udp --permanent firewall-cmd –reload
Once I added these ports in the rules, I was able to join the worker node in the master.
You’re done. docker swarm error resposnedocker swarm port numbers docker swarm not working