pankaj
pankaj

Reputation: 85

getting docker swarm cluster worker node error

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?

Upvotes: 0

Views: 436

Answers (2)

Hushen
Hushen

Reputation: 613

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.

Upvotes: -1

kostyanius
kostyanius

Reputation: 41

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.

Upvotes: 0

Related Questions