I have two servers in Docker Swarm, but when I need to add a third server - I get the result:
Error response from daemon: rpc error: code = 14 desc = grpc: the connection is unavailable
All servers in one network.
What could be the problem?
I'd say it's possibly firewall related. Ensure your ports are configured correctly on the third box. From the Docker docs:
Open protocols and ports between the hosts The following ports must be available. On some systems, these ports are open by default.
TCP port 2377 for cluster management communications TCP and UDP port 7946 for communication among nodes UDP port 4789 for overlay network traffic
From official Docker swarm tutorial
The following ports must be open on your docker hosts.
TCP port 2377 for cluster management communications
TCP and UDP port 7946 for communication among nodes
UDP port 4789 for overlay network traffic
To enable this ports run the below command on all your docker hosts. kindly follow the digitalocen article for complete steps.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With