Apache zookeeper 无法启动Mesos/Marathon群集

Apache zookeeper 无法启动Mesos/Marathon群集,apache-zookeeper,mesos,marathon,Apache Zookeeper,Mesos,Marathon,物理机器:192.168.10.1(Mesos、动物园管理员、马拉松) 虚拟机:192.168.122.10(Mesos,Zookeeper) 虚拟机:192.168.122.46(Mesos,Zookeeper) 这三台机器的操作系统都是Fedora23服务器 默认情况下,这两个网络已经相互路由,因为虚拟机都驻留在物理机上 没有防火墙设置 Mesos选举日志: Master bound to loopback interface! Cannot communicate with remote

物理机器:192.168.10.1(Mesos、动物园管理员、马拉松)
虚拟机:192.168.122.10(Mesos,Zookeeper)
虚拟机:192.168.122.46(Mesos,Zookeeper)

这三台机器的操作系统都是Fedora23服务器

默认情况下,这两个网络已经相互路由,因为虚拟机都驻留在物理机上

没有防火墙设置

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\u discovery\u命令
标志

我想做的是将下面的脚本链接到该标志

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
不知道如何验证它是否正常工作

老实说,我已经筋疲力尽了。。在过去的一周里,我一直在这方面纠结,原因是糟糕的文档和缺乏适当的体系结构解释(主要是马拉松式的)、组织糟糕的日志(meso)、systemd无法正确解析bash并将输出用作变量,以及缺乏全面的说明

我做错什么了吗?我感谢任何帮助,我可以得到,让我知道,如果你需要什么我还没有提供,我会立即张贴

编辑:

我修复了marathon的问题,向VM添加了两个额外的marathon服务器,以便它们可以形成仲裁

EDIT2:

我现在遇到了Mesos服务器不断快速重新选举领导人的问题。。。但取决于结果,我将在稍后对此进行研究…

如果您密切关注这个问题,我认为您应该让它发挥作用

例如,“主绑定到环回”问题与不正确/不完整的设置有关。见:

主机名(可选)

如果无法直接解析计算机的主机名(例如,如果在不同的网络上或使用VPN),请将
/etc/mesos master/hostname
设置为可以解析的值,例如,外部可访问的IP地址或DNS主机名。这将确保Mesos控制台的所有链接正常工作

您还需要在
/etc/marathon/conf/hostname
中设置此属性

此外,我还建议在
/etc/mesos Master/IP
文件中设置主IP地址。始终确保主机名可解析为非本地IP地址,即在每个主机上的
/etc/hosts
文件中添加条目

基本上,
/etc/hosts
文件应该与此类似(用实际主机名替换主机名):

如果您只想测试Mesos群集,还可以使用预先配置的流浪解决方案,如

关于ZooKeeper设置,请确保您在每个节点上创建了一个
/var/lib/ZooKeeper/myid
,其中包含您为每个节点设置的实际数字id,例如,对于
192.168.10.1
,文件的唯一内容需要是
1

在调试主机之前,请检查ZooKeeper集群是否正常工作,以及是否选择了一位领导者。确保
/etc/mesos/zk
在每个主机上包含正确的ZooKeeper连接字符串,例如

zk://192.168.10.1:2181,192.168.122.10:2181,192.168.122.46:2181/mesos
如果ZK工作,那么重新启动服务并检查主日志。对奴隶也一样

参考资料:


稍微提醒一下@tobi:open.mesophere.com已被弃用,不久将消失,可能不想将其用作参考,继续;)@MichaelHausenblas谢谢你的提醒。如果能在页面的某个地方说明这一点,那就太好了。我能够使用提供的可用链接为不同的操作系统配置集群,因此它们似乎仍然正确(说到最新的Mesos版本)。我的安装没有/etc/Mesos和/etc/Mesos master或/etc/zookeeper/conf/目录。。。我不知道它是否也会读到它们。。。好消息是我的动物园管理员跑得很好。我将尝试创建它们,看看它是如何运行的。您是如何安装Mesos的?通过官方存储库?那些路径应该在那里,你按照文件走是对的。。。我自己也差不多到了,但我没有在独立模式下设置marathon(我只有一个节点),所以marathon试图创建仲裁,但无法仅使用一个节点。
zk://192.168.10.1:2181,192.168.122.10:2181,192.168.122.46:2181/mesos