0

I'm working on docker swarm. When I connect to a worker node I get this error:

Error response from daemon: rpc error: code = 14 desc = grpc: the connection is unavailable

I have already stopped firewall and setenforce 0. What could be the problem?

Fruchtzwerg
  • 10,999
  • 12
  • 40
  • 49
pankaj
  • 85
  • 1
  • 8
  • 1
    What command are you executing? You have add more details to your question. Add more details on your setup – Tarun Lalwani Aug 20 '17 at 06:40
  • Tarun Lalwani :- actually i initialized docker swarm at system 1 by this command (docker swarm init --advertise-addr "IP") . swarm started . and worker node side i'm putting the command (add worker node) . at worker node side i'm getting this error – pankaj Aug 25 '17 at 06:30
  • and my this problem is solved by reinstalling docker-engine. now i'm getting new error (Error response from daemon: error while validating Root CA Certificate: x509: certificate has expired or is not yet valid) while adding worker node – pankaj Aug 25 '17 at 06:33
  • use `docker swarm leave` on master node and reinstall docker on master also and then use `docker swarm init` again – Tarun Lalwani Aug 25 '17 at 06:36
  • i have tried this lot's of time ..,but always getiing same error or other error . – pankaj Aug 25 '17 at 06:43
  • Are you using proxy or VPN on any of the systems? – Tarun Lalwani Aug 25 '17 at 06:44
  • no i'm not using any proxy or VPN. i just have 4 machine in my VM .i'm trying over the VM – pankaj Aug 25 '17 at 15:46
  • Check `date` on both systems, they should be same else you get SSL errors – Tarun Lalwani Aug 25 '17 at 15:48
  • date and time both are same....in all VM – pankaj Aug 25 '17 at 18:03
  • What adapters are all the VM using? Attached screenshot of the adapter settings of the two VM in question – Tarun Lalwani Aug 25 '17 at 18:05
  • i'm using at bridge mode. all VM's – pankaj Aug 26 '17 at 21:00

2 Answers2

0

If you are using VM then you can init docker swarm with alternative IP Address using docker "swarm init --advertise-addr :"

Example: docker swarm init --advertise-addr 192.168.99.100:2377 and then add the nodes to the swarm.

Example: docker swarm join --token --advertise-addr : docker swarm join --token SWMTKN-1-RANDOMTOKEN 192.168.99.100:2377

Some people say that it works only with 2377 port.

Check yourself if it works for you as well.

kostyanius
  • 31
  • 2
  • 5
-1

If you are using the swarm init --advertise-addr <some ip>.Then you will get the join token but when I am going to add new swarm to the manager as a worker then i am getting the same error node is already part of swarm. So take care while using vm ip address. It should be different from and exact match to the manager ip.

CodeNotFound
  • 22,153
  • 10
  • 68
  • 69
Hushen
  • 427
  • 1
  • 4
  • 15