MAPREDUCE服务 MRS-执行balance常见问题定位方法:问题1:报没权限(Access denied)执行balance

时间:2024-08-27 10:23:52

问题1:报没权限(Access denied)执行balance

问题详细:执行start-balancer.sh,“hadoop-root-balancer-主机名.out”日志显示“Access denied for user test1. Superuser privilege is required”

 
cat /opt/client/HDFS/hadoop/logs/hadoop-root-balancer-host2.out
Time Stamp               Iteration#  Bytes Already Moved  Bytes Left To Move  Bytes Being Moved
INFO: Watching file:/opt/client/HDFS/hadoop/etc/hadoop/log4j.properties for changes with interval : 60000
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Access denied for user test1. 
Superuser privilege is required
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkSuperuserPrivilege(FSPermissionChecker.java:122)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkSuperuserPrivilege(FSNamesystem.java:5916)

问题根因:

执行balance需要使用管理员账户

解决方法

  • 安全版本

    使用hdfs或者其他属于supergroup组的用户认证后,执行balance

  • 普通版本

    执行HDFS的balance命令前,需要在客户端执行su - hdfs命令。

support.huaweicloud.com/trouble-mrs/mrs_03_0094.html