Mesos/Marathon 无法访问 EC2 代理主机名

Mesos/Marathon on EC2 agents hostnames not accessible

我正在亚马逊 EC2 上设置一个 Mesos/Marathon 集群,其中包含一个主节点和两个代理。安装成功,在查看 :mesos-port 时,代理已正确列出。

Host由私有DNS注册(ip-17*---.ec2.internal).

当我尝试通过 Marathon webui 启动 docker 图像 (tutum/hello-world) 时,部署失败。

在 Mesos UI 中,已完成的任务列表将显示失败的部署尝试。在沙盒 link 下,它指出:

Failed to connect to agent '12136c28-93e7-4642-a5b6-c5e9a55eedd1-S0' on 'ip-17*-**-*-***.ec2.internal:5051'.
Potential reasons:
The agent's hostname, 'ip-17*-**-*-***.ec2.internal', is not accessible from your network

无法从您的网络访问代理的端口“5051” 代理超时或下线

我在安全组中完全打开了端口范围,我可以从主服务器ping到代理服务器。

为了安全起见,我将私有 ip 添加到 /etc/hosts 文件中,但这也没有任何作用。

有什么想法吗?

我很久以前做过这个所以我不记得确切的路径了。

在Slave中进入/etc/mesos-slave文件夹(缺少则新建),新建两个文件如下:

1) 在其中设置容器化文件(“mesos,docker”)。

2) 设置 Execution_time_out 文件,其中包含 (“5mins”)。

参考: https://mesosphere.github.io/marathon/docs/native-docker.html https://mesosphere.github.io/marathon/docs/troubleshooting.html

现在重启你的主从。

另外,你需要开放你的安全组中的所有端口。您可以打开所有流量进行测试(不推荐)

完成!