【发布时间】:2016-08-21 10:53:36
【问题描述】:
物理机:192.168.10.1(Mesos、Zookeeper、Marathon)
虚拟机:192.168.122.10(Mesos、Zookeeper)
虚拟机:192.168.122.46(Mesos、Zookeeper)
三台机器的操作系统都是 Fedora 23 Server
默认情况下,这两个网络已经相互路由,因为虚拟机都驻留在物理机上。
没有防火墙设置。
Mesos 选举日志:
Master bound to loopback interface! Cannot communicate with remote schedulers or slaves. You might want to set '--ip' flag to a routable IP address.
我可以手动设置,但是我不能动态设置...--ip_discovery_command 标志无法识别。
我想做的是将下面的脚本链接到该标志。
if [[ $(ip addr) == *enp8s0* ]];
then
ip addr show enp8s0 | awk -F'/| ' '/inet/ { print $6 }'
else
ip addr show eth0 | awk -F'/| ' '/inet/ { print $6 }'
fi
当我手动设置时(不是我想要做的)......
IP:5050 的 Mesos 页面出现了……但由于这个原因,mesos-master 在 1 分钟后失败了……
F0427 17:03:27.975260 6914 master.cpp:1253] Recovery failed: Failed to recover registrar: Failed to perform fetch within 1mins
*** Check failure stack trace: ***
@ 0x7f8360fa9edd (unknown)
@ 0x7f8360fabc50 (unknown)
@ 0x7f8360fa9ad3 (unknown)
@ 0x7f8360fac61e (unknown)
@ 0x7f83619a85dd (unknown)
@ 0x7f83619e7c30 (unknown)
@ 0x55a885ee3b2e (unknown)
@ 0x7f8361a11c0e (unknown)
@ 0x7f8361a5d75e (unknown)
@ 0x7f8361a7077a (unknown)
@ 0x7f83618f4aae (unknown)
@ 0x7f8361a70768 (unknown)
@ 0x7f8361a548d0 (unknown)
@ 0x7f8361fc832c (unknown)
@ 0x7f8361fd42a5 (unknown)
@ 0x7f8361fd472f (unknown)
@ 0x7f8360a5e60a start_thread
@ 0x7f835fefda4d __clone Aborted (core dumped)
Zookeeper 是这样设置的:
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/var/lib/zookeeper/data
dataLogDir=/var/lib/zookeeper/log
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
server.1:192.168.10.1:2888:3888
server.2:192.168.122.46:2888:3888
server.3:192.168.122.10:2888:3888
并且不知道如何验证它是否正常工作......
老实说,我已经走到尽头了.. 由于文档不足和缺乏适当的架构解释(主要是 Marathon),在过去的一周里,我在这件事上拉了我的头发。正确解析 bash 并将输出用作变量,并且周围缺少指令。
我做错了吗?感谢我能得到的任何帮助,如果您需要我尚未提供的任何内容,请告诉我,我会立即发布。
编辑:
我通过向虚拟机添加两个额外的 Marathon 服务器来解决 marathon 的问题,以便它们可以形成一个仲裁。
EDIT2:
我现在遇到了 Mesos 服务器不断快速重新选举领导者的问题......但根据结果,我稍后会调查......
【问题讨论】:
标签: apache-zookeeper mesos marathon