Warm tip: This article is reproduced from serverfault.com, please click

I can attach to docker swarm as worker but can not attach as manager

发布于 2020-11-28 01:22:27

After sudo docker swarm join --token XXXXX YYY.YYY.YYY.YYY:2377 I can attach to swarm as worker successfully. Than I leave this swarm from secondary/slave node and try again with management token. And receive:

Error response from daemon: manager stopped: can't initialize raft node: rpc error: code = Unknown desc = could not connect to prospective new cluster member using its advertised address: rpc error: code = DeadlineExceeded desc = context deadline exceeded

Both nodes directly connected one to another. Firewall in both node is not working. What can be a reason of this issue?

Questioner
Viacheslav
Viewed
0
n0nvme 2020-11-28 09:35:45

You can add a node as worker and promote it to manager role

docker swarm join --token XXXXX YYY.YYY.YYY.YYY:2377

And on the manager node:

docker node promote SECOND_MANAGER_HOSTNAME