Docker1.12 Worker无法join群集(Swarm:Pending)

Manager版本Docker version 1.12.0-rc5, build a3f2063

工作者版本Docker version 1.12.0-rc5, build a3f2063

创buildSwarm经理:

 docker swarm init --advertise-addr "172.25.30.2:4243" Swarm initialized: current node (3kmewyb10p8xj3ke5rpjyw4s8) is now a manager. To add a worker to this swarm, run the following command: docker swarm join \ --token SWMTKN-1-5lwzvv7au6hosiqqmdwmcxvmlmhtz4ts04jsg06284fq3posn0-enq26dqnwma38ij48hymtnioq \ 172.25.30.2:4243 To add a manager to this swarm, run the following command: docker swarm join \ --token SWMTKN-1-5lwzvv7au6hosiqqmdwmcxvmlmhtz4ts04jsg06284fq3posn0-85cwe5pf779qw0knjn6wxdbim \ 172.25.30.2:4243 

然后创build工人

 docker swarm join --token SWMTKN-1-5lwzvv7au6hosiqqmdwmcxvmlmhtz4ts04jsg06284fq3posn0-enq26dqnwma38ij48hymtnioq 172.25.30.2:4243 Error response from daemon: Timeout was reached before node was joined. Attempt to join the cluster will continue in the background. Use "docker info" command to see the current swarm status of your node. 

我已经检查了工人的日志

 time="2016-08-01T00:22:47.449844174-07:00" level=warning msg="failed to retrieve remote root CA certificate: rpc error: code = 1 desc = context canceled" time="2016-08-01T00:22:47.449962215-07:00" level=warning msg="failed to retrieve remote root CA certificate: rpc error: code = 1 desc = context canceled" time="2016-08-01T00:22:47.450025342-07:00" level=warning msg="failed to retrieve remote root CA certificate: rpc error: code = 1 desc = context canceled" time="2016-08-01T00:22:47.450081950-07:00" level=warning msg="failed to retrieve remote root CA certificate: rpc error: code = 1 desc = context canceled" time="2016-08-01T00:22:47.450142443-07:00" level=warning msg="failed to retrieve remote root CA certificate: rpc error: code = 1 desc = context canceled" time="2016-08-01T00:22:47.450202836-07:00" level=error msg="cluster exited with error: rpc error: code = 1 desc = context canceled" time="2016-08-01T00:23:31.351868722-07:00" level=error msg="Handler for POST /v1.24/swarm/join returned error: Timeout was reached before node was joined. Attempt to join the cluster will continue in the background. Use \"docker info\" command to see the current swarm status of your node." 

docker info ,我看到“群:待定”

我也做了docker swarm update ! 尽pipe如此,工作人员还是无法join集群。 所以,我怎么能reslove

UPDATE-1

卸载并删除configuration文件,然后再安装Docker version 1.12.0, build 8eab29e 1.12 Docker version 1.12.0, build 8eab29e

仍然面临同样的问题(无法join和docker info “Swarm:Pending”),在/var/logs/upstat/docker.logs有不同的错误

 time="2016-08-01T11:22:08.629760770-07:00" level=error msg="Handler for POST /v1.24/swarm/join returned error: Timeout was reached before node was joined. Attempt to join the cluster will continue in the background. Use \"docker info\" command to see the current swarm status of your node." 

谢谢。

事情是,我试图join错误的“端口”(作为docker swarm init显示在输出中)。

1)在“docker swarm init”之前,仅在端口“4243”上运行的docker。 我检查了netstat -tulp | grep docker netstat -tulp | grep docker 。 所以我宣传了这个港口!

 root@veeru:~# netstat -tulpn | grep docker tcp6 0 0 :::4243 :::* LISTEN 8750/dockerd root@veeru:~# docker swarm init --advertise-addr "172.25.30.2:4243" Swarm initialized: current node (exvwgj0pu4cd124ljnblt9xff) is now a manager. To add a worker to this swarm, run the following command: docker swarm join \ --token SWMTKN-1-5j9mpo8hepue6g1sjdas33thr92w1o9hlef5auwqpbxs3glt39-6zomhgu204m9alq51f632nzas \ 172.25.30.2:4243 To add a manager to this swarm, run the following command: docker swarm join \ --token SWMTKN-1-5j9mpo8hepue6g1sjdas33thr92w1o9hlef5auwqpbxs3glt39-axhgqgo4jqw4hv38x578m44wh \ 172.25.30.2:4243 

2)docker swarm init之后, netstat -tupln | grep docker运行4端口,包括端口2377netstat -tupln | grep docker )。

 root@veeru:~# netstat -tulp | grep docker tcp6 0 0 [::]:2377 [::]:* LISTEN 8750/dockerd tcp6 0 0 [::]:7946 [::]:* LISTEN 8750/dockerd tcp6 0 0 [::]:4243 [::]:* LISTEN 8750/dockerd udp6 0 0 [::]:7946 [::]:* 8750/dockerd 

在第1点,它告诉在工作者端口4243运行docker swarm join 。 以前我是这样跑的!(不会工作!)

后来我做了docker swarm leave并join了2377港口。 现在我可以join!

 docker swarm join --token SWMTKN-1-5j9mpo8hepue6g1sjdas33thr92w1o9hlef5auwqpbxs3glt39-6zomhgu204m9alq51f632nzas 172.25.30.2:2377 

我遇到类似的问题,而在我的情况下,由于防火墙规则,端口被阻止。

我有同样的问题。 我在Azure中运行coreos vms。 我发现所有的vms都有相同的私有ip地址和不同的公网ip地址。 当vms是同一安全组的一部分时,通常会发生这种情况,但这次并不是这种情况。 问题是我的帐户已经达到了最大的资源数量,所以我删除了资源,如IP地址,NSG,networking等,然后重新configuration新的虚拟机,他们有不同的私人ips,当运行命令一切都很好。 我的docker版本是1.12.6