Help Center> MapReduce Service> Troubleshooting> Using Flink> Failed to Create a Flink Cluster by Running yarn-session As Different Users
Updated on 2023-11-30 GMT+08:00

Failed to Create a Flink Cluster by Running yarn-session As Different Users

Symptom

Two users testuser and bdpuser with the same rights are used to create the Flink cluster.

When user testuser is used to create a Flink cluster, no error message is displayed. While user bdpuser is used to create a Flink cluster, an error message is displayed during the yarn-session.sh command execution:

2019-01-02 14:28:09,098 | ERROR | [main] | Ensure path threw exception | org.apache.flink.shaded.curator.org.apache.curator.framework.imps.CuratorFrameworkImpl (CuratorFrameworkImpl.java:566) 
org.apache.flink.shaded.zookeeper.org.apache.zookeeper.KeeperException$NoAuthException: KeeperErrorCode = NoAuth for /flink/application_1545397824912_0022

Possible Causes

The HA configuration item is not modified.

In the Flink configuration file, the default value of high-availability.zookeeper.client.acl is creator, indicating that only the creator has the access permission. A new user cannot access the directory on ZooKeeper. As a result, the yarn-session.sh command execution fails.

Solution

  1. Change the value of high-availability.zookeeper.path.root in the conf/flink-conf.yaml file, for example:

    high-availability.zookeeper.path.root: flink2

  2. Submit the Flink task again.