Flink 1.2 无法在 HA Cluster 模式下启动 [英] Flink 1.2 does not start in HA Cluster mode

查看:39
本文介绍了Flink 1.2 无法在 HA Cluster 模式下启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 HA 集群模式 2 JobManagers 1 TaskManager 本地安装了 Flink 1.2 并且它一直拒绝在这种模式下实际启动显示启动集群."消息而不是在 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"),它将设置为none"并在 bin/start-cluster.sh

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.

还有其他人遇到过这种情况吗?

Anyone else faced this?

推荐答案

是的,我认为这是一个错误: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 Cluster 模式下启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆