docker swarm join \
> --token SWMTKN-1-498jdoqw7ne0nvcv6tcpajt7p4osuja6agni9e8kr2f1w2knys-2uxv6jhobs8f0t6lkrwnmsus3 \
> XXX.XXX.XX.101:2377 \
> --listen-addr XXX.XXX.XX.103:2377
As a result my output was:
Error response from daemon: rpc error: code = Unavailable desc = grpc: the connection is unavailable
What I would like to do is:
root@ubuntu:~# docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
q8qrlm9jt5xc9usb0mm2rnjjd * manager2 Ready Active Leader
Add another node under the manager2, well what I’ve done is probably a mess.
Is there a for me to correct this mistake or rather add another node using:
docker swarm init …
docker swarm run …
etc. ?
I hope my message was clear for everyone 
If not please let me know what you don’t understand from my set of instructions.
Kind Regards,
Hey @if6was9 ,
same problem here. Did you solved it?
I am using Ubuntu 16.04 LTS, Kernel 14.10.0-35.
docker-ce 17.06.2-ce
Already tried to flush iptables etc. without success.
Another guy at our company is using a mix of debian stretch and ubuntu docker hosts(vms) and he is fine with the newest docker-ce.
Thanks and have a nice weekend all
Fixed!
related to: https://github.com/moby/moby/issues/34825#issuecomment-331100937 and https://github.com/grpc/grpc-go/commit/955c867061e3b1a5b8f6f07d1efcf1b69af043d8 I have had configured a company proxy in
/etc/systemd/system/docker/http-proxy.conf
after removing this config, all 17.09 docker versions will join the swarm properly.
I faced same issue. Error response from daemon: rpc error: code = Unavailable desc = grpc: the connection is unavailable .
In my case , Iptables caused the issue. I stopped the iptables service to resolve this issue.
Temporary solved by flushing iptables, but was a bad idea!! After that, cloning images didn’t work because it didn’t find the appropriate iptables chain “docker”.
It is indeed a FW issue, but more precisely firewalld (centos7).
Solved the issue by allowing the appropriate ports through firewalld,:
sudo firewall-cmd --add-port=2376/tcp --permanent
sudo firewall-cmd --add-port=2377/tcp --permanent
sudo firewall-cmd --add-port=7946/tcp --permanent
sudo firewall-cmd --add-port=7946/udp --permanent
sudo firewall-cmd --add-port=4789/udp --permanent
I got the exact same error, and finally found out I was being too smart. Below is my output from the init command, so make sure you just copy the bold line. I was changing the ip address to another vm2.
$ docker-machine ssh myvm1 “docker swarm init --advertise-addr 192.168.99.101”
Swarm initialized: current node (o7egg259g3bjibx5cubiaiu5h) is now a manager.
To add a worker to this swarm, run the following command:
**docker swarm join --token SWMTKN-1-1h201mpziax5vx5qud8e5sxbcejp1durmeiwj4hsbsx0koagv8-8lqloy869v38sdd8x7dbziimi 192.168.99.101:2377**
To add a manager to this swarm, run ‘docker swarm join-token manager’ and follow the instructions.
I was facing same issue .
I created 2 machines
centos-1 running docker - Version: 17.12.0-ce
centos-2 running docker - Version: 17.12.0-ce
i made centos-1 as master / manager node . I was trying to make centos-2 as worker node but it was failing with same error .
So i stopped the firewall with #iptables -F command and then restarted docker daemon by stsremctl restart docker .
Post which my problem was resolved and it
[root@centos2 ~]# docker swarm join --token SWMTKN-1-4026x0nvco9tkxk8zrxu9khal33g3mlhvgba1tfinl5i73yur1-7yihj163dq62sn8hhvw6iv6gr 192.168.56.105:2377
This node joined a swarm as a worker.
This was also a firewall issue for me. On Ubuntu 18.04:
sudo ufw enable
sudo ufw allow 2376
sudo ufw allow 2377
sudo ufw allow 7946
sudo ufw allow 4789
These rules will be stored permanently in a file called user.rules
which can be found using locate user.rules
. Mine was in /etc/ufw/user.rules
.