Flink 1.2无法在HA群集模式下启动 [英] Flink 1.2 does not start in HA Cluster mode
问题描述
我已经在HA群集模式下安装了Flink 1.2,在本地安装了2个JobManagers 1个TaskManager,但它一直拒绝以这种模式实际启动 正在启动群集."消息而不是 在ZooKeeper仲裁中以2个主节点和1个对等节点启动HA群集."
I've installed Flink 1.2 in HA cluster mode 2 JobManagers 1 TaskManager locally and it kept refusing to actually start in this mode showing "Starting cluster." message instead of "Starting HA cluster with 2 masters and 1 peers in ZooKeeper quorum."
显然,在bin/config.sh中,它读取如下配置:
Apparently in the bin/config.sh it reads the configuration like:
# High availability
if [ -z "${HIGH_AVAILABILITY}" ]; then
HIGH_AVAILABILITY=$(readFromConfig ${KEY_HIGH_AVAILABILITY} "" "${YAML_CONF}")
if [ -z "${HIGH_AVAILABILITY}" ]; then
# Try deprecated value
DEPRECATED_HA=$(readFromConfig "recovery.mode" "" "${YAML_CONF}")
if [ -z "${DEPRECATED_HA}" ]; then
HIGH_AVAILABILITY="none"
elif [ ${DEPRECATED_HA} == "standalone" ]; then
# Standalone is now 'none'
HIGH_AVAILABILITY="none"
else
HIGH_AVAILABILITY=${DEPRECATED_HA}
fi
else
HIGH_AVAILABILITY="none"
fi
fi
这意味着独立于配置文件中高可用性"键的配置内容(在我的情况下为"zookeeper"),它将在bin/start-cluster.sh中将其设置为"none". >
which means independently of what is configured for "high-availability" key in the configuration file (in my case value was "zookeeper") it will set that to "none" and in bin/start-cluster.sh
if [[ $HIGH_AVAILABILITY == "zookeeper" ]]; then
# HA Mode
readMasters
echo "Starting HA cluster with ${#MASTERS[@]} masters."
for ((i=0;i<${#MASTERS[@]};++i)); do
master=${MASTERS[i]}
webuiport=${WEBUIPORTS[i]}
ssh -n $FLINK_SSH_OPTS $master -- "nohup /bin/bash -l \"${FLINK_BIN_DIR}/jobmanager.sh\" start cluster ${master} ${webuiport} &"
done
else
echo "Starting cluster."
# Start single JobManager on this machine
"$FLINK_BIN_DIR"/jobmanager.sh start cluster
fi
永远不会进入第一个if分支.
will never get in the first if branch.
还有其他人面对吗?
推荐答案
是的,我认为这是一个错误:issues.apache.org/jira/browse/FLINK-6000.
Yes I believe it is a bug: issues.apache.org/jira/browse/FLINK-6000.
它已经有一个待定的PR.
It has already a pending PR.
这篇关于Flink 1.2无法在HA群集模式下启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!