docker-It's possible that too few managers are online. Make sure more than half of the managers are

问题:docker ---- It's possible that too few managers are online. Make sure more than half of the managers are online.  node

背景:docker测试集群,为3台虚拟机,镜像所有拷贝自其它docker 虚拟机。 因为原先安装过swarm,先通过拷贝重启后在执行 dowker swarm XX  时报错。docker

 

解决:测试

 

1.每台先强制init :this

  docker swarm init --force-new-cluster     (此时执行 docker node ls --将node信息删除,缘由是这些node所有来自我拷贝的镜像中老旧的信息。)token

2.而后此时选取 swarm worker节点加入到其中一台时:docker swarm join --token **** ip

  报错Error response from daemon: This node is already part of a swarm. Use "docker swarm leave" to leave this swarm and join another one.ci

3.根据提示须要 docker swarm leave ,而后报错:虚拟机

  Error response from daemon: You are attempting to leave the swarm on a node that is participating as a manager. Removing the last manager erases all current state of the swarm. Use `--force` to ignore this message.it

4.根据提示:加上--force : docker swarm leave --force   而后再从新join便可io

 

 

附:Server Version: 17.12.1-ce

相关文章
相关标签/搜索