Help Center/ MapReduce Service/ User Guide (Ankara Region)/ Troubleshooting/ Using Flink/ Failed to Create a Cluster by Executing the yarn-session Command When a Different User Is Used
Updated on 2024-11-29 GMT+08:00

Failed to Create a Cluster by Executing the yarn-session Command When a Different User Is Used

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. Modify the value of high-availability.zookeeper.path.root in the conf/flink-conf.yaml file. For example, run the following command:

    high-availability.zookeeper.path.root: flink2

  2. Submit the tasks again.