Docker Swarm Worker错误:来自守护程序的错误响应:在节点加入之前已达到超时

时间:2018-06-19 05:36:43

标签: docker docker-swarm

我一直关注this tutorial在Hyperledger Fabric上设置多主机网络,但在加入PC2作为docker swarm的worker时,我收到错误。

我已执行以下步骤。

在PC1上,

himani@himani-HP-Notebook:~$ docker swarm init
Swarm initialized: current node (632ijg7z6mktr0w9quilvn1i2) is now a manager.

To add a worker to this swarm, run the following command:

    docker swarm join --token SWMTKN-1-5qmka8a239apira1zmnk76lrnfdrxnb6dj8cjgrj6x2hfqmxin-anau7v6yg89lauoxsvkwp7qwm 192.168.43.78:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.

然后创建经理,即PC1

himani@himani-HP-Notebook:~$ docker swarm join-token manager
To add a manager to this swarm, run the following command:

    docker swarm join --token SWMTKN-1-5qmka8a239apira1zmnk76lrnfdrxnb6dj8cjgrj6x2hfqmxin-5jkpf59ns743nvco9y7t66ncb 192.168.43.78:2377

himani@himani-HP-Notebook:~$ docker swarm join --token SWMTKN-1-5qmka8a239apira1zmnk76lrnfdrxnb6dj8cjgrj6x2hfqmxin-5jkpf59ns743nvco9y7t66ncb 192.168.43.78:2377
Error response from daemon: This node is already part of a swarm. Use "docker swarm leave" to leave this swarm and join another one.
himani@himani-HP-Notebook:~$ 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.
himani@himani-HP-Notebook:~$ docker swarm leave --force
Node left the swarm.
himani@himani-HP-Notebook:~$ docker swarm join --token SWMTKN-1-5qmka8a239apira1zmnk76lrnfdrxnb6dj8cjgrj6x2hfqmxin-5jkpf59ns743nvco9y7t66ncb 192.168.43.78:2377
Error response from daemon: rpc error: code = 14 desc = grpc: the connection is unavailable

这些是PC1的ifconfig设置

himani@himani-HP-Notebook:~$ ifconfig
br-265f83fad915 Link encap:Ethernet  HWaddr 02:42:ac:a3:89:fa  
          inet addr:172.22.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

br-550f9551727c Link encap:Ethernet  HWaddr 02:42:e8:e6:a4:97  
          inet addr:172.18.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

br-76955e67b3d1 Link encap:Ethernet  HWaddr 02:42:8e:58:c5:c0  
          inet addr:172.21.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

br-966ad10fdc06 Link encap:Ethernet  HWaddr 02:42:a2:f4:bc:a5  
          inet addr:172.19.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::42:a2ff:fef4:bca5/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:516 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21754 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:18096 (18.0 KB)  TX bytes:935049 (935.0 KB)

br-e6ebf3138263 Link encap:Ethernet  HWaddr 02:42:56:09:e4:e3  
          inet addr:172.20.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

docker0   Link encap:Ethernet  HWaddr 02:42:f9:bd:e0:ba  
          inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::42:f9ff:febd:e0ba/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:2849 (2.8 KB)

docker_gwbridge Link encap:Ethernet  HWaddr 02:42:fd:7c:f5:19  
          inet addr:172.23.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::42:fdff:fe7c:f519/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:9970 (9.9 KB)

enp7s0    Link encap:Ethernet  HWaddr a0:8c:fd:75:f5:c6  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:154580 errors:0 dropped:0 overruns:0 frame:0
          TX packets:154580 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:14853461 (14.8 MB)  TX bytes:14853461 (14.8 MB)

wlp19s0   Link encap:Ethernet  HWaddr 68:14:01:8d:a8:fd  
          inet addr:192.168.43.78  Bcast:192.168.43.255  Mask:255.255.255.0
          inet6 addr: fe80::1e12:3ebd:1415:dfc9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4332918 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3582621 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1241011858 (1.2 GB)  TX bytes:585873205 (585.8 MB)

不确定命令中是否使用了正确的IP地址。但是,端口是正确的。

enter image description here

1 个答案:

答案 0 :(得分:0)

ns = {'s': 'http://www.loc.gov/MARC21/slim'} eng = root.findall('.//s:datafield[@tag="856"][s:subfield="English"]/s:subfield[@code="u"]', namespaces=ns) 群集时,该第一个节点已作为第一个主节点在群集中。在获得将来节点的join命令后,您需要先连接(ssh等)这些节点,然后安装docker,然后在这些节点上运行init命令。