Shi*_*d T 3 amazon-ec2 docker docker-swarm
我是AWS EC2的新手,
目标:在EC2上创建3个Ubuntu机器实例,并在第一个实例上初始化Swarm,并将其他2个实例作为工作器添加到Swarm中.
错误:Swarm初始化工作正常,但向swarm添加worker会引发错误
~$ docker swarm join --token SWMTKN-1-4yquvx0xihdhcv0m1vmxmbq4q45hoanm9ig00pue7opx3dhc1s-2ybrjxx97mpjyo351sx8jyisp 172.31.31.41:2377
Error response from daemon: Timeout was reached before node was 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.
~$ docker info
*****
Swarm: error
NodeID:
Error: rpc error: code = DeadlineExceeded desc = context deadline exceeded
Is Manager: false
******
Run Code Online (Sandbox Code Playgroud)
我已经查看了stackoverflow上的相关问题(Docker 1.12.1:swarm init之后,工作人员无法加入swarm)但是这些解决方案在我的情况下不起作用
如何启用其他2个实例加入群组
这看起来与您的安全设置有关.确保所有必需的端口都已打开
经理人:
Custom TCP Rule TCP 2377 swarm + remote mgmt
Custom TCP Rule TCP 7946 swarm
Custom UDP Rule UDP 7946 swarm
Custom UDP Rule UDP 4789 swarm
Run Code Online (Sandbox Code Playgroud)
对工人
Custom TCP Rule TCP 7946 swarm
Custom UDP Rule UDP 7946 swarm
Custom UDP Rule UDP 4789 swarm
Run Code Online (Sandbox Code Playgroud)
请参阅下面的更多细节
https://gist.github.com/BretFisher/7233b7ecf14bc49eb47715bbeb2a2769
还要检查ufw status,iptables -S并sestatus确保其中任何一个都没有阻止访问
| 归档时间: |
|
| 查看次数: |
1564 次 |
| 最近记录: |