James Ray Anderson

James Ray Anderson
James Ray Anderson
0 comments

Docker - Swarm certificates have expired

5:16 PM


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 ls
docker info
docker node demote [node id] 
docker node rm [node id] 
docker swarm join-token manager
You should get something like
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.
Next
This is the most recent post.
Older Post

0 comments:

 
Toggle Footer
Top