不能离开群模式

时间:2016-08-09 08:44:27

标签: docker docker-swarm

我一直在修补新的Docker swarm模式。我无法完全回想起我所做的步骤,但现在我陷入了我的码头引擎作为不存在群体中的工作者的情况:

$ docker info
...
Swarm: active
 NodeID: 1vndsuqa0r3paswufs7eq4po3
 Is Manager: false
 Node Address: 192.168.65.2
...

$ docker swarm leave
Error response from daemon: context deadline exceeded

$ docker version
Client:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 21:04:48 2016
 OS/Arch:      darwin/amd64
 Experimental: true

Server:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 21:04:48 2016
 OS/Arch:      linux/amd64
 Experimental: true

我怎么能摆脱群模式?

2 个答案:

答案 0 :(得分:2)

我认为这是1.12.0中已经解决的错误(我相信补丁应该包含在1.12.3中)。这是Related Issue

但如果新版本的问题仍然存在,那么还有一些其他选择:

# Force quit the cluster

docker swarm leave --force

# Force a new cluster and leave properly

docker swarm init --force-new-cluster
docker swarm leave

答案 1 :(得分:0)

我终于设法通过将docker重置为Docker menu > Preferences > Uninstall / Reset > Reset to factory defaults的出厂默认值来解决此问题(我使用Docker for Mac beta)。请注意,此操作还会刷所有泊坞窗图像,卷,网络等。