首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >拥有码头机器的init停靠者群:超过了上下文截止日期

问拥有码头机器的init停靠者群:超过了上下文截止日期
EN

Stack Overflow用户
提问于 2018-01-03 17:39:16
回答 3查看 5.2K关注 0票数 1

我正在学习码头机,同时也遇到了一些问题。

我的电脑是mac,用Docker做mac。我通过坞机创建了2个vm、vm1和vm2,并尝试插入一个具有节点的集群-vm1、vm2和我的mac.My步骤如下:

  1. 创建一个名为“sprinla/cms:最新版本”的映像和一个docker-compose.yml
代码语言:javascript
复制
version: "3"
services:
  web:
    image: sprinla/cms:latest
    deploy:
      replicas: 1
    ports:
      - "80:80"
    networks:
      - webnet
    command: /data/start.sh
networks:
  webnet:

2.创建2 vms.Here是vm信息:

代码语言:javascript
复制
yuxrdeMBP:~ yuxr$ docker-machine ls  
NAME   ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER        ERRORS  
vm1    -        virtualbox   Running   tcp://192.168.99.100:2376           v17.12.0-ce  
vm2    -        virtualbox   Running   tcp://192.168.99.101:2376           v17.12.0-ce  
  1. 在我的mac主机上:

yuxrdeMBP:~ yuxr$ docker群中的群初始化:当前节点(uf6rg1v91exlwntlskyj8iim7)现在是一个管理器。要向这个群中添加一个工作人员,请运行以下命令: docker -token SWMTKN-1-3qb32l84n0s8vl74rj9d6psm7bzdany3piw55ohtrq0q7ly814-c5km5zg3kj9d6vn6vrtt6xxtg 192.168.65.2:2377以向该群中添加一个经理,运行‘码头群连接-令牌管理器’并按照说明执行。

4加入vm1进行群集,然后出现问题

代码语言:javascript
复制
yuxrdeMBP:~ yuxr$ docker-machine ssh vm1 "docker swarm join --token SWMTKN-1-3qb32l84n0s8vl74rj9d6psm7bzdany3piw55ohtrq0q7ly814-c5km5zg3kj9d6vn6vrtt6xxtg 192.168.65.2:2377"
Error response from daemon: Timeout was reached before node joined. The attempt to join the swarm will continue in the background. Use the "docker info" command to see the current swarm status of your node.
exit status 1

5.禁止使用码头日志:

代码语言:javascript
复制
time="2018-01-03T17:13:50.387854642Z" level=debug msg="Calling GET /_ping"
time="2018-01-03T17:13:50.388228524Z" level=debug msg="Calling GET /_ping"
time="2018-01-03T17:13:50.388521374Z" level=debug msg="Calling POST /v1.35/swarm/join"
time="2018-01-03T17:13:50.388583426Z" level=debug msg="form data: {\"AdvertiseAddr\":\"\",\"Availability\":\"\",\"DataPathAddr\":\"\",\"JoinToken\":\"*****\",\"ListenAddr\":\"0.0.0.0:2377\",\"RemoteAddrs\":[\"192.168.65.2:2377\"]}"
time="2018-01-03T17:13:55.392578452Z" level=error msg="failed to retrieve remote root CA certificate" error="rpc error: code = DeadlineExceeded desc = context deadline exceeded" module=node
time="2018-01-03T17:14:02.394608777Z" level=error msg="failed to retrieve remote root CA certificate" error="rpc error: code = DeadlineExceeded desc = context deadline exceeded" module=node
time="2018-01-03T17:14:09.395720474Z" level=error msg="failed to retrieve remote root CA certificate" error="rpc error: code = DeadlineExceeded desc = context deadline exceeded" module=node
time="2018-01-03T17:14:10.393743738Z" level=error msg="Handler for POST /v1.35/swarm/join returned error: Timeout was reached before node joined. The attempt to join the swarm will continue in the background. Use the \"docker info\" command to see the current swarm status of your node."
time="2018-01-03T17:14:16.398095265Z" level=error msg="failed to retrieve remote root CA certificate" error="rpc error: code = DeadlineExceeded desc = context deadline exceeded" module=node
time="2018-01-03T17:14:23.399587783Z" level=error msg="failed to retrieve remote root CA certificate" error="rpc error: code = DeadlineExceeded desc = context deadline exceeded" module=node
time="2018-01-03T17:14:25.399943337Z" level=error msg="cluster exited with error: rpc error: code = DeadlineExceeded desc = context deadline exceeded"
  1. 以下是我的mac ifconfig信息:yuxrdeMBP:~ yuxr$ ifconfig lo0: flags=8049 mtu 16384 options=1203 in1 127.0.0.1网络掩膜0xff000000 inet6 :1前缀128 inet6 fe80 ::1 %lo0前缀64个前缀0x1 nd6 options=201 gif0: flags=8010 mtu 1280 stf0: flags=0<> mtu 1280 XHC20: flags=0<> mtu 0 en0: flags=0<>mtu 1280 stf0:flags=0<>mtu 0 XHC20:flags=0<>mtu 0 flags=0<>:flags=0<>mtu 1280 XHC20MULTICAST> mtu 1500乙醚ac:bc:32:81:97:37 inet6 fe80::4d8:6b2:718a:5d3b%en0前缀64MULTICAST> mtu 1484乙醚36:9f:65:fd:34:c3 inet6 fe80:349 f:65 fd:fefd:34c3%awdl0前缀64 nd6 options=201媒体:自动选择状态:激活en1: flags=8963 mtu 1500 options=60以太6a:00:00:e3:4c:30媒体:自动选择状态:非活动的en2: flags=8963 mtu 1500 options=60醚6a:00:00:e3:4c:31媒体:自动选择状态:非活动bridge0: flags=8822 mtu 1500 options=63醚6a:00:00:e3:4c:30配置: id 0:0:0:0:0:0优先级0 hellotime 0 maxage 0DISCOVER> ifmaxaddr 0端口8优先级0路径成本0成员: en2 flags=3 ifmaxaddr 0端口9优先级0路径成本0媒体:状态:非活动的utun0: flags=8051 mtu 2000 options=6403 64 80::441 e:c0e3:5429:2abb%utun0前缀64个东莨菪碱0xb nd6 options=201 utun1: flags=8051 mtu 1380 DAD>,TXCSUM,,#en2 20#,ZEROINVERT_CSUM> inet6 fe80::7820:5bac:4735:7f82%utun1前缀64 inet6 01 44:5cb3:4ab4:5d08:7820:5bac:4735:7f82前缀64 nd6 options=201 utun2: flags=8051 mtu 1380 options=6403 inet6 fe80::26f2:e964:8dfb:e884%utun1 2前缀64 0xd 0xd nd6 options=201 gpd0: SMART,SMART,01,en21 19# mtu 1400醚02:50:41:01单纯形,MULTICAST> mtu 1500乙醚0A:00:27:00:00 inet 192.168.99.1网络掩码0 ether 00广播192.168.99.255

为什么?

mac主机有ip,192.168.99.1,vm1有ip 192.168.99.100,vm2有ip 192.168.99.101,它们在同一个网络中,为什么vm1和vm2不能加入mac主机群?

另一个问题:如果我使用vm1作为群集管理器,请在mac主机上运行“停靠群联接”逗号,当连接作为工作人员时,它可以加入但不能使用;当连接作为管理器时会出现错误:

代码语言:javascript
复制
yuxrdeMBP:~ yuxr$ docker swarm join --token SWMTKN-1-49w1hd28hs1mtj3sgmd0o3q7n59zgppvd18vs0iwhcnjemzmwb-7mk35zdnaslt1p41gninvwlud 192.168.99.100:2377
Error response from daemon: manager stopped: can't initialize raft node: rpc error: code = Unknown desc = could not connect to prospective new cluster member using its advertised address: rpc error: code = Unavailable desc = grpc: the connection is unavailable

谢谢你帮我!

EN

回答 3

Stack Overflow用户

发布于 2018-01-22 09:44:39

Mac主机和Mac的Docker之间没有路由。因此,在Mac上,您只能在VM之间设置多节点群集,而Mac的标准Docker不能参与多节点游泳。这是对在OSX上实现网络的一个限制。

请参阅文档,在这里将对此进行解释。请参阅此问题以获得更多背景信息。

票数 2
EN

Stack Overflow用户

发布于 2020-10-13 17:55:13

对我来说,这个错误是通过让安全组对AWS中的所有通信量进行入站规则来解决的。

票数 0
EN

Stack Overflow用户

发布于 2022-07-04 06:51:03

在试图加入群集集群时,我也遇到了同样的错误,因为一名工作人员为此使用了来自Google云的两个VM。

经理节点运行良好,..docker信息-> swarm没有给出任何错误.但是当我试图用令牌加入工作节点时..。我得到了这个错误“来自守护进程的错误响应:在节点加入之前到达了超时。试图加入蜂群的尝试将在后台继续。使用"docker info”命令查看节点的当前群集状态。而docker信息显示了"rpc错误: code = DeadlineExceeded desc =上下文截止日期在群错误中被超过“

尝试了很多不同的东西,终于在下面的解决方案中奏效了。

解决方案。->。我用的是“码头群--力--新集群”。在一个vms中,我试着作为一个工人加入..。然后我在现有的管理节点上使用了“码头群离开-强制”。作为一个工作者加入到新创建的集群中。当试图作为新集群的工作人员加入时,其他vm也可以工作。

ubuntu - 18.04对接版-20.10.17

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48082414

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档