Overview
Had an issue where a node on the swarm became unreachable. Went to one of the nodes in the swarm, determined the affected node(s), removed the node, re-added the node. Here is a list of the commands to get you through it. Error
Swarm: error
NodeID:
Error: Swarm certificates have expired. To replace them, leave the swarm and join again.
Resolution
On one of the working nodes, preferably the Leader (manager), identify the affected node(s) and demote them if manager, then get the join-token:docker node lsYou should get something like
docker info
docker node demote [node id]
docker node rm [node id]
docker swarm join-token manager
docker swarm join \
--token SWMTKN-1-2pzofffas8tybjm0-aui5ma2p19fmm4jcxpj84xw8y \
192.168.5.33:2377
Copy the join command that is given. Go to the affected (down) node:
docker node ls
docker info
docker swarm leave --force
docker swarm join \
--token SWMTKN-1-2pzofffas8tybjm0-aui5ma2p19fmm4jcxpj84xw8y \
192.168.5.33:2377
docker node ls
Your mileage may vary.
0 comments:
Post a Comment