【问题标题】:Mesos cluster deployment with Marathon使用 Marathon 部署 Mesos 集群
【发布时间】:2015-10-24 06:49:46
【问题描述】:

我有三台机器 M1、M2 和 M3。我在 M1 上部署了 mesos-master、zookeeper 和 marathon,在 M2 和 M3 上部署了 mesos-slave。然而,在 Mesos Gui 上,显示了零奴隶。然后我运行命令 mesos-resolve cat /etc/mesos/zk 来检查从站是否发现了正确的主站。但是不,它错误地将 127.0.0.1:5050 发现为主服务器。以下是上述命令的日志:

2015-07-31 15:38:02,522:17271(0x7f538b7cf700):ZOO_INFO@zookeeper_init@786: Initiating client connection, host=M1_IP:2181 sessionTimeout=10000 watcher=0x7f5392b130b0 sessionId=0 sessionPasswd=<null> context=0x7f5378003960 flags=0
2015-07-31 15:38:02,525:17271(0x7f5386dba700):ZOO_INFO@check_events@1703: initiated connection to server [M1_IP:2181]
2015-07-31 15:38:02,541:17271(0x7f5386dba700):ZOO_INFO@check_events@1750: session establishment complete on server [M1_IP:2181], sessionId=0x14ee590e0ec0008, negotiated timeout=10000
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0731 15:38:02.541931 17273 group.cpp:313] Group process (group(1)@127.0.0.1:53978) connected to ZooKeeper
I0731 15:38:02.542022 17273 group.cpp:787] Syncing group operations: queue size (joins, cancels, datas) = (0, 0, 0)
I0731 15:38:02.542045 17273 group.cpp:385] Trying to create path '/mesos' in ZooKeeper
I0731 15:38:02.545756 17273 detector.cpp:138] Detected a new leader: (id='1')
I0731 15:38:02.545891 17273 group.cpp:656] Trying to get '/mesos/info_0000000001' in ZooKeeper
W0731 15:38:02.547034 17273 detector.cpp:444] Leading master master@127.0.0.1:5050 is using a Protobuf binary format when registering with ZooKeeper (info): this will be deprecated as of Mesos 0.24 (see MESOS-2340)
I0731 15:38:02.547114 17273 detector.cpp:481] A new leading master (UPID=master@127.0.0.1:5050) is detected

如日志所示,我在 M1/zookeeper 中查找了 /mesos/info_0000000001 的节点值。结果是这样的:

!20150801-152910-16777343-5050-765???'"master@127.0.0.1:5050*
marathon-120.23.0

Mesos 主设置:cat /etc/mesos/zk

zk://M1_IP:2181/mesos

看起来,M1 的 mesos master 是如何不将其绝对 IP 存储在 zookeeper 节点中的。谁能解释一下这种奇怪的行为。

【问题讨论】:

    标签: java apache-zookeeper mesos mesosphere marathon


    【解决方案1】:

    您可能需要明确告诉 Master 要绑定到哪个 IP,请参阅--ip 标志。

    【讨论】:

    • 你也可以检查你的/etc/hosts/文件,看看hostname返回什么以及你尝试ping &lt;hostname&gt;时得到什么
    【解决方案2】:

    在

    /etc/mess/zk文件,请注明你的机器IP地址。

    例如:

    zk://192.168.0.1:2181/mesos
    

    请在 mesos slave 中反映相同的变化。

    【讨论】:

      【解决方案3】:

      最好将外部接口 IP 添加到 /etc/mesos-master/ip。然后它将正确发布到zookeeper,而不是localhost ip。你也应该对奴隶做同样的事情。

      【讨论】:

        【解决方案4】:

        在我的情况下,通过将 /etc/hosts 中的环回地址 (127.0.1.1) 替换为 eth0 的正确 IP(以便 hostname -i 返回正确的 IP 地址)解决了问题。然后我重新启动了所有服务,一切都开始工作了。当然,如果 IP 地址发生变化,这将中断。

        我在 Mesos 安装说明中没有看到任何关于此的内容(也许我忽略了它),但我必须做同样的事情才能使 Hadoop 安装正常工作。

        【讨论】:

          猜你喜欢
          • 2015-08-31
          • 1970-01-01
          • 2016-08-21
          • 1970-01-01
          • 1970-01-01
          • 2016-07-20
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多