开发者社区> rayner> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

hadoop_异常_02_ExitCodeException exitCode=1: chmod: changing permissions of `/ray/hadoop/dfs/data': Operation not permitted

简介: 一、异常现象 启动hadoop时,datanode启动失败,出现如下异常: 2018-03-23 14:39:09,962 WARN org.apache.hadoop.hdfs.server.
+关注继续查看

一、异常现象

启动hadoop时,datanode启动失败,出现如下异常:

2018-03-23 14:39:09,962 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Invalid dfs.datanode.data.dir /ray/hadoop/dfs/data : 
ExitCodeException exitCode=1: chmod: changing permissions of `/ray/hadoop/dfs/data': Operation not permitted

    at org.apache.hadoop.util.Shell.runCommand(Shell.java:538)
    at org.apache.hadoop.util.Shell.run(Shell.java:455)
    at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:715)
    at org.apache.hadoop.util.Shell.execCommand(Shell.java:808)
    at org.apache.hadoop.util.Shell.execCommand(Shell.java:791)
    at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:656)
    at org.apache.hadoop.fs.FilterFileSystem.setPermission(FilterFileSystem.java:490)
    at org.apache.hadoop.util.DiskChecker.mkdirsWithExistsAndPermissionCheck(DiskChecker.java:140)
    at org.apache.hadoop.util.DiskChecker.checkDir(DiskChecker.java:156)
    at org.apache.hadoop.hdfs.server.datanode.DataNode$DataNodeDiskChecker.checkDir(DataNode.java:2239)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.checkStorageLocations(DataNode.java:2281)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:2263)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:2155)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:2202)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:2378)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:2402)
2018-03-23 14:39:09,965 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Exception in secureMain
java.io.IOException: All directories in dfs.datanode.data.dir are invalid: "/ray/hadoop/dfs/data/" 
    at org.apache.hadoop.hdfs.server.datanode.DataNode.checkStorageLocations(DataNode.java:2290)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:2263)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:2155)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:2202)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:2378)
    at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:2402)
2018-03-23 14:39:09,970 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 1

 

 

 

二、异常原因

 原因是 用户 ray 不具备文件夹所属权

 

三、异常解决

 通过命令:

 sudo  chown -R  ray:ray /ray

将文件夹ray及其子文件夹的所属权赋给用户 ray

 

然后再重新启动即可

 

四、参考资料

 自己奇思妙想

 

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
SAP cross distribution chain status在Fiori应用中的draft handling
The explanation why draft handling is necessary in Fiori application could be found from Fiori Design Guideline. In this blog, I will use the update of field “cross distribution chain status” in S4 Product master Fiori application as example. This field could be found from Fiori UI:
44 0
A Note on Performance Degradation When Migrating from Oracle to MySQL
MySQL databases behave quite differently from Oracle databases. Databases need to be optimized after migrating from one to the other.
2233 0
Refused to display 'xxx' in a frame ,because it set 'X-Frame-Options' to 'deny'.
我本是在DJANGO页面的iframe里嵌入springboot的页面。 当报了这个错误之后,我花了时间在nginx和django上, 后来才改变解决思路,从springboot出发,解决问题。
5150 0
Asp.Net Web API 2第十八课——Working with Entity Relations in OData
原文:Asp.Net Web API 2第十八课——Working with Entity Relations in OData 前言   阅读本文之前,您也可以到Asp.Net Web API 2 系列导航进行查看 http://www.cnblogs.com/aehyok/p/3446289.html。
911 0
Failed setting up proxy interface org.apache.hadoop.hbase.ipc.HRegionInterface
搭建hbase的时候遇到这个问题org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed setting up proxy interface org.
664 0
+关注
338
文章
4
问答
文章排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载