Flink 1.2无法在HA群集模式下启动

时间:2017-03-14 18:16:10

标签: apache-flink flink-streaming flink-cep

我已经在HA群集模式下安装了Flink 1.2 2本地的JobManagers 1 TaskManager并且它一直拒绝在此模式下实际启动 "启动集群。"消息而不是 "在ZooKeeper仲裁中启动具有2个主服务器和1个对等服务器的HA集群。"

显然在bin / config.sh中,它读取的配置如下:

# 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")它将设置为" none"并在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分支。

其他人面临这个问题?

1 个答案:

答案 0 :(得分:1)

是的我相信这是一个错误:issues.apache.org/jira/browse/FLINK-6000。

它已经有待处理的公关。