当前位置:   article > 正文

hadoop_异常_02_ExitCodeException exitCode=1: chmod: changing permissions of `/ray/hadoop/dfs/data': Op...

exitcodeexception exitcode=1: /opt/beh/core/hadoop/etc/hadoop/topology.sh: l

一、异常现象

启动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

 

然后再重新启动即可

 

四、参考资料

 自己奇思妙想

 

转载于:https://www.cnblogs.com/shirui/p/8630319.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/205404
推荐阅读
相关标签
  

闽ICP备14008679号