在执行docker swarm join命令(作为管理员)时,我遇到以下错误:
Error response from daemon: manager stopped: can't initialize raft node: rpc error: code = Internal desc = connection error: desc = "transport: x509: certificate is not valid for any names, but wanted to match swarm-manager"
加入同一个群体,但作为工人,工作无懈可击。
日志文件显示以下项目:
kmo@GETSTdock-app01 ~ $ sudo tail -f /var/log/upstart/docker.log
time="2018-07-06T09:18:17.890620199+02:00" level=info msg="Listening for connections" addr="[::]:2377" module=node node.id=7j75bmugpf8k2o0onta1yp4zy proto=tcp
time="2018-07-06T09:18:17.892234469+02:00" level=info msg="manager selected by agent for new session: { 10.130.223.107:2377}" module=node/agent node.id=7j75bmugpf8k2o0onta1yp4zy
time="2018-07-06T09:18:17.892364019+02:00" level=info msg="waiting 0s before registering session" module=node/agent node.id=7j75bmugpf8k2o0onta1yp4zy
time="2018-07-06T09:18:18.161362606+02:00" level=error msg="fatal task error" error="cannot create a swarm scoped network when swarm is not active" module=node/agent/taskmanager node.id=7j75bmugpf8k2o0onta1yp4zy service.id=p3ng4om2m8rl7ygoef18ayohp task.id=weaubf3qj5goctlh2039sjvdg
time="2018-07-06T09:18:18.162182077+02:00" level=error msg="fatal task error" error="cannot create a swarm scoped network when swarm is not active" module=node/agent/taskmanager node.id=7j75bmugpf8k2o0onta1yp4zy service.id=6sl9y5rcov6htwbyvm504ewh2 task.id=j3foc6rjszuqszj41qyqb6mpe
time="2018-07-06T09:18:18.184847516+02:00" level=info msg="Stopping manager" module=node node.id=7j75bmugpf8k2o0onta1yp4zy
time="2018-07-06T09:18:18.184993569+02:00" level=info msg="Manager shut down" module=node node.id=7j75bmugpf8k2o0onta1yp4zy
time="2018-07-06T09:18:18.185020917+02:00" level=info msg="shutting down certificate renewal routine" module=node/tls node.id=7j75bmugpf8k2o0onta1yp4zy node.role=swarm-manager
time="2018-07-06T09:18:18.185163663+02:00" level=error msg="cluster exited with error: manager stopped: can't initialize raft node: rpc error: code = Internal desc = connection error: desc = \"transport: x509: certificate is not valid for any names, but wanted to match swarm-manager\""
time="2018-07-06T09:18:18.185492995+02:00" level=error msg="Handler for POST /v1.37/swarm/join returned error: manager stopped: can't initialize raft node: rpc error: code = Internal desc = connection error: desc = \"transport: x509: certificate is not valid for any names, but wanted to match swarm-manager\""
当我以工作人员身份加入,然后尝试将该节点提升为管理者节点时,也会遇到类似的问题。
Docker版本= 18.03.1
OS = Ubuntu 14.04 LTS
有人知道如何解决这个问题吗?
答案 0 :(得分:0)
这可能行不通,但您可以尝试
在管理器上运行:
docker swarm leave --force
使用以下方法重新创建群体:
docker swarm init --advertise-addr [ip-address for initial manager]
然后尝试使用广告地址添加经理
还可以尝试:
从docker代理定义文件/etc/systemd/system/docker.service.d/docker.conf
或/etc/systemd/system/docker.service.d/docker_proxy.conf
重新加载守护进程
systemctl daemon-reload
重新执行docker swarm join --token manager
答案 1 :(得分:0)
有关,我不得不打开端口dat1 <- structure(list(itemindex = c(1L, 2L, 3L, 1L, 2L), damageid = c(2433L, 2434L, 2435L, 2521L, 2522L), impacttype = c(1L, 11L, 13L, 10L, 8L), vehicleid = c("VEH1", "VEH1", "VEH1", "VEH012", "VEH012")), class = "data.frame", row.names = c(NA, -5L))
dat2 <- structure(list(itemindex = c(1L, 2L, 3L, 4L, 1L, 1L, 1L, 1L, 1L, 2L, 3L), circumstancecode = c(18, 17, 40.88, 70.88, 0, 61, 17, 40.88, 0, 0, 55.88), circumstanceid = 4231703:4231713, circumstancetype = c("Person", "Person", "Person", "Person", "Person", "Person", "Person", "Person", "Person", "Person", "Person"), personid = c("PERSON_01", "PERSON_01", "PERSON_01", "PERSON_01", "PERSON_02", "PERSON_03", "PERSON_04", "PERSON_05", "PERSON_06", "PERSON_06", "PERSON_06"), reportnumber = c("REPORT1", "REPORT1", "REPORT1", "REPORT1", "REPORT1", "REPORT2", "REPORT3", "REPORT4", "REPORT4", "REPORT4", "REPORT4")), class = "data.frame", row.names = c(NA, -11L))
dat3 <- structure(list(itemindex = c(1L, 2L, 1L, 1L, 2L, 3L, 4L, 1L, 2L, 3L), personid = c("PERSON_55", "PERSON_56", "PERSON_44", "PERSON_32", "PERSON_34", "PERSON_35", "PERSON_36", "PERSON_21", "PERSON_22", "PERSON_23"), reportnumber = c("REPORT_1", "REPORT_1", "REPORT_2", "REPORT_3", "REPORT_3", "REPORT_3", "REPORT_3", "REPORT_4", "REPORT_4", "REPORT_4")), class = "data.frame", row.names = c(NA, -10L))
在接合管理器节点的防火墙;这似乎奏效了。我不知道这是不是最好的做法,因为我仍然与码头工人群一个小白:但它添加到的事情的清单尝试,如果你有这样的问题。