Apache zookeeper 无法启动Mesos/Marathon群集
物理机器:192.168.10.1(Mesos、动物园管理员、马拉松)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.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工作,那么重新启动服务并检查主日志。对奴隶也一样
参考资料:
zk://192.168.10.1:2181,192.168.122.10:2181,192.168.122.46:2181/mesos