在swarm-worker1中运行docker swarm join 出现rpc error
来源:7-2 创建一个三节点的swarm集群
吴蔚
2018-03-24
hurongchengs-mac:centos7-three-node hrc$ vagrant ssh swarm-worker1 [vagrant@swarm-worker1 ~]$ docker swarm join --token SWMTKN-1-2y7di7d8l28op7bdirfaq5tt6iwydimfb0kmy50waikok19cyf-50nnuf6563ua22g4cfnpyq55x 192.168.205.10:2377 Error response from daemon: rpc error: code = Unavailable desc = grpc: the connection is unavailable [vagrant@swarm-worker1 ~]$ telnet 192.168.205.10 2377 Trying 192.168.205.10... telnet: connect to address 192.168.205.10: Connection refused
在worker1中使用telnet测试swarm-manager的2377端口,链接拒绝。关闭了两台机器的防火墙仍有问题。
这是vagrant@swarm-manager上swarm manager节点:
[vagrant@swarm-manager ~]$ docker swarm init --advertise-addr=192.168.205.10 Swarm initialized: current node (f035qwdaq93caxjbo5dwxvjmc) is now a manager. To add a worker to this swarm, run the following command: docker swarm join --token SWMTKN-1-2y7di7d8l28op7bdirfaq5tt6iwydimfb0kmy50waikok19cyf-50nnuf6563ua22g4cfnpyq55x 192.168.205.10:2377 To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions. [vagrant@swarm-manager ~]$ docker node ls ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION f035qwdaq93caxjbo5dwxvjmc * swarm-manager Ready Active Leader 18.03.0-ce
麻烦老师帮忙看看
写回答
3回答
-
您好,请问master节点初始化成功了么?您在swarm join之前,在master之上用docker node ls看看是否master正常。
072018-03-24 -
NioCo
2020-09-15
确保端口2377 ,7946, 4789是打开的
00 -
吴蔚
提问者
2018-03-24
在老师知道下处理了很久,始终不能添加worker,最后把worker和manager交换了功能。把worker当作manager用,成功把原来的manager添加进去。再次感谢老师
00
相似问题