我从docker开始,当我尝试此命令时:
$ docker service list
在我的服务器上,我收到此错误消息
*Error: Swarm certificates have expired. To replace them, leave the swarm and join again*.
正如错误所言,我必须离开大群并再次加入。但是问题是我没有蜂群的令牌,地址和端口。我也不知道哪个节点是群管理器。命令
$ docker info
gives me the following output :
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 149
Server Version: 1.13.0
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 226
Dirperm1 Supported: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: error
NodeID:
Error: Swarm certificates have expired. To replace them, leave the swarm and join again.
Is Manager: false
Node Address: 172.30.4.4
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
runc version: 2f7393a47307a16f8cee44a37b262e8b81021e3e
init version: 949e6fa
Security Options:
apparmor
Kernel Version: 3.13.0-108-generic
Operating System: Ubuntu 14.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.861 GiB
Name: london-pop
ID: 3O2U:VE5T:CMZU:HZUW:H3FR:ATB3:HRQE:Q2PI:BEOY:VS4T:4L4L:X276
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: maouadj
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false"
有人可以告诉我如何解决大量证书过期的问题,或者如何从工作节点中获取群集令牌,Ip地址和端口?注意:几乎所有docker swarm swarm命令都给我相同的错误:
Error: Swarm certificates have expired. To replace them, leave the swarm and join again.
离开群后使用
$ docker swarm leave
总是可以从集群管理器节点获取join命令,而无需重新创建整个集群。命令docker swarm join-token
将为您提供所需的命令:
$ docker swarm join-token worker
To add a worker to this swarm, run the following command:
docker swarm join --token SWMTKN-1-0g9sxv0seaovqakgmyobizjhqgazmhra4gn5lnjpczzscfmxpv-ct131a54ghh2igx6v1st0txw4 192.168.65.3:2377
$ docker swarm join-token manager
To add a manager to this swarm, run the following command:
docker swarm join --token SWMTKN-1-0g9sxv0seaovqakgmyobizjhqgazmhra4gn5lnjpczzscfmxpv-65otgvl9wm9w3h5agq3wvei4u 192.168.65.3:2377
参考:https://docs.docker.com/engine/reference/commandline/swarm_join/