PriviledgedActionException as:root (auth:SIMPLE) cause:0: No such file or directory
2020-01-13 15:35
429 查看
刚学MapReduce.
写WordCount的代码(代码没问题的情况下) , 运行后报错:
错误代码
19/11/12 07:57:19 INFO Configuration.deprecation: session.id is deprecated. Instead, use dfs.metrics.session-id 19/11/12 07:57:19 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId= 19/11/12 07:57:19 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same. 19/11/12 07:57:19 INFO mapred.JobClient: Cleaning up the staging area file:/tmp/hadoop-root/mapred/staging/okakio637697353/.staging/job_local637697353_0001 19/11/12 07:57:19 WARN security.UserGroupInformation: PriviledgedActionException as:root (auth:SIMPLE) cause:0: No such file or directory Exception in thread "main" 0: No such file or directory
在百度搜索后,有以下解决方案:
1:
错误原因:mapred-site.xml配置有问题:
正确配置如下
<property> <name>mapreduce.framework.name</name> <value>yarn</value> </property>
试过之后不行
2:
每个NM的core-site.xml设置下下面的属性就可以了
<property> <name>dfs.permissions</name> <value>false</value> </property>
试过之后不行
3:
加入各种代码:
如:
System.setProperty("HADOOP_USER_NAME","root");,
conf.set("dfs.permissions","false");
运行后依然报错
最终解决方案:
打开everything搜索
/tmp/hadoop-root/,把这个tmp文件移到hadoop相同的磁盘下,再次运行即可成功
备注: 可能有人用户名是中文的 , 就会导致乱码的情况, Hadoop不会帮你创建tmp目录, 在代码里加入: conf.set(“hadoop.tmp.dir”,“自己的路径名”)
如:conf.set(“hadoop.tmp.dir”,“E:\tmp\hadoop-abc”);
- 点赞 4
- 收藏
- 分享
- 文章举报
相关文章推荐
- hadoop tasktracker 异常:PriviledgedActionException as:adlog cause:ENOENT: No such file or directory
- PriviledgedActionException as:aolx (auth:SIMPLE) cause:org.apache.hadoop.mapred.FileAlreadyExistsException:
- Android java.io.FileNotFoundException on Android, open failed: ENOENT (No such file or directory)
- stop-hbase.sh出现stopping hbasecat:/tmp/hbase-root-master.pid:No such file or directory
- Caused by: java.io.FileNotFoundException: dbcpconfig.properties (No such file or directory)
- java.io.FileNotFoundException on Android, open failed: ENOENT (No such file or directory)
- Linux su - root无法登陆 :No such file or directory
- [PDOException] SQLSTATE[HY000] [2002] No such file or directory
- Mac下Exception 'yii\db\Exception' with message 'SQLSTATE[HY000] [2002] No such file or directory'
- Laravel5遇到的问题以及解决方案 -- PDOException SQLSTATE[HY000] [2002] No such file or directory
- Linux su - root无法登陆 :No such file or directory
- Mac下Exception 'yii\db\Exception' with message 'SQLSTATE[HY000] [2002] No such file or directory'
- 切换 root 时 cannot execute ljy : NO such file or directory
- postfix auth_getpwent.c:48:20: error: des.h: No such file or directory
- web 项目log4j配置无法获取文件(java.io.FileNotFoundException: /logs/log.txt (No such file or directory))猜想
- cloudera-scm-server启动时出现Caused by: java.io.FileNotFoundException: /var/lib/cloudera-scm-server/.keystore (No such file or directory)问题解决方法(图文详解)
- RAC 执行root.sh 报错 libcap.so.1: cannot open shared object file: No such file or directory
- log4j java.io.FileNotFoundException: log4j.dtd (No such file or directory)
- Caused by: java.io.FileNotFoundException: velocity.log (No such file or directory)
- /dev/root: No such file or directory