Problem Description:
There is a problem when running Hadoop HDFS in idea. The error is as follows:
org. Apache. Hadoop. Security. Accesscontrolexception: permission denied: user = XXXX, access = write, inode = “/”: root: supergroup: drwxr-xr-x
because the user name of this machine is different from that of the Linux operating system, an error will be reported.
Solution:
Under Linux system, find the directory where Hadoop is installed, and find etc/Hadoop/HDFS site. XML
under this directory
<property>
<name>dfs.permissions.enabled</name>
<value>false</value>
<description>
If "true", enable permission checking in HDFS.
If "false", permission checking is turned off,
but all other behavior is unchanged.
Switching from one parameter value to the other does not change the mode,
owner or group of files or directories.
</description>
</property>
Add the above code, restart the cluster, and there will be no problem in operation.
Solution:
The ultimate code, one line solution
Add system.setproperty ("hadoop_user_name", "root") to the Java code Code> to set the permissions of the client to operate on HDFS. that will do
Read More:
- hdfs-bug:DataXceiver error processing WRITE_BLOCK operation
- Make the root user login through SSH and report the error of “permission denied, please try again”
- hdfs 192.168.2.19:9000 failed on connection exception: java.net.ConnectException:Connection refused
- Error 1396 (HY000): Operation create user failed for ‘xxx’ @’xxx ‘
- [MySQL] error 1396 (HY000): Operation create user failed for ‘MySQL’ @’localhost ‘
- Linux-mysql8.0 password reset problem – error 1396 (HY000): Operation alter user failed for ‘root’ @’localhost ‘
- -bash: /usr/java/jdk1.8.0_101/bin/java: Permission denied
- [resolved] superset failed to create admin user: error! User already exists user or attributeerror: ‘nonetype’‘
- NACOS error com.alibaba.nacos.api.exception.NacosException: failed to req API:/api//nacos/v1/ns/instance
- Android has applied for permission and still prompts open failed: eacces (permission denied)
- Error: attempting to operate on HDFS namenode as root
- Developing in Android java.net.SocketException : socket failed: eacces (permission denied) reported an error
- Solve the problem of dynamically applying for permission, but still reporting an error of open failed: eacces (permission denied)
- Solution: unable to delete folder (you need permission to perform this operation)
- [Solved] com.alibaba.nacos.api.exception.NacosException: failed to req API
- Permission error: [errno 13] permission denied: ‘… ” xxx.pyd ‘
- Error when Java uses API to operate zookeeper
- Introduction of Hadoop HDFS and the use of basic client commands
- User space operation GPIO error echo: write error: device or resource busy error resolution
- Nginx redirects the interfac /API to another interface/API