mesos集群部署与marathon

yx2lnoni  于 2021-06-21  发布在  Mesos
关注(0)|答案(4)|浏览(384)

我有三台机器m1、m2和m3。我在m1上部署了mesos master、zookeeper和marathon,在m2和m3上部署了mesos slave。但是,在mesos gui上,没有显示从机。然后我运行命令mesos resolve cat /etc/mesos/zk 检查slave是否发现了正确的master。但是不,它错误地发现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\u0000000001的节点值。结果是这样的:

!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

因此,看起来,mesos在m1掌握了一些如何不在zookeeper节点中存储其绝对ip的方法。有人能解释这种奇怪的行为吗。

k0pti3hp

k0pti3hp1#

在我的例子中,通过将/etc/hosts中的环回地址(127.0.1.1)替换为eth0的正确ip地址(以便 hostname -i 返回正确的ip地址)。然后我重新启动了所有的服务,一切都开始工作。当然,如果ip地址发生变化,这将中断。
我在mesos安装说明中没有看到任何关于这一点的内容(可能我忽略了它),但是为了让hadoop安装正常工作,我必须做同样的事情。

ej83mcc0

ej83mcc02#

您可能需要明确地告诉主机要绑定到哪个ip,请参阅 --ip 旗帜。

zvokhttg

zvokhttg3#

/etc/mess/zk 文件,请注明您的机器ip地址。
前任:

zk://192.168.0.1:2181/mesos

请反映相同的变化在mesos奴隶。

hi3rlvi2

hi3rlvi24#

将外部接口ip添加到 /etc/mesos-master/ip . 它将被正确地发布到zookeeper,而不是localhost ip。你也应该为奴隶做同样的事。

相关问题