`

hadoop tasktracker 无法启动 Failed to set permissions to 0700

 
阅读更多

有可能你的TaskTracker无法启动,错误如下,

 

2013-02-25 15:13:57,208 ERROR org.apache.hadoop.mapred.TaskTracker: Can not start task tracker because java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Administrator\mapred\local\ttprivate to 0700

at org.apache.hadoop.fs.FileUtil.checkReturnValue(FileUtil.java:689)

at org.apache.hadoop.fs.FileUtil.setPermission(FileUtil.java:662)

at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:509)

at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:344)

at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:189)

at org.apache.hadoop.mapred.TaskTracker.initialize(TaskTracker.java:728)

at org.apache.hadoop.mapred.TaskTracker.<init>(TaskTracker.java:1459)

at org.apache.hadoop.mapred.TaskTracker.main(TaskTracker.java:3742)

 

这个是Windows下文件权限问题,在Linux下可以正常运行,不存在这样的问题。

解决方法是,修改/hadoop-1.0.2/src/core/org/apache/hadoop/fs/FileUtil.java里面的checkReturnValue,注释掉即可(有些粗暴,在Window下,可以不用检查):

......privatestaticvoidcheckReturnValue(booleanrv,Filep,FsPermissionpermission)throwsIOException{/** if (!rv) { throw new IOException("Failed to set permissions of path: " + p + " to " + String.format("%04o", permission.toShort())); } **/}......

重新编译打包hadoop-core-1.0.2.jar,替换掉hadoop-1.0.2根目录下的hadoop-core-1.0.2.jar即可。

这里提供一份修改版的hadoop-core-1.0.2-modified.jar文件,替换原hadoop-core-1.0.2.jar即可。

替换之后,刷新项目,设置好正确的jar包依赖,现在再运行WordCountTest,即可。

成功之后,在Eclipse下刷新HDFS目录,可以看到生成了ouput2目录:

分享到:
评论

相关推荐

    hadoop1.0 Failed to set permissions of path 解决方案

    ERROR org.apache.hadoop.mapred.TaskTracker: Can not start task tracker because java.io.IOException: Failed to set permissions of path: \tmp\hadoop-admin \mapred\local\ttprivate to 0700 at org.apache...

    hadoop-core-1.2.0解决eclipse Hadoop Failed to set permissions of path错误

    eclipse远程调试hadoop时 报出eclipse Hadoop Failed to set permissions of path错误 修改hadoop core包中FileUtil java文件 里面有checkReturnValue方法 将代码throw new IOException &quot;Failed to set ...

    Failed to set permissions of path: \tmp\hadoop-Administrator

    Failed to set permissions of path: \tmp\hadoop-Administrator,的解决方法,更换hadoop-core-1.0.2-modified.jar包

    解决nutch在window系统安装问题

    解决nutch在window系统安装报错问题Exception in thread "main" java.io.IOException: Failed to set permissions of path: \tmp\hadoop-tom\mapred\staging\tom1698089073\.staging to 0700,替换jar包OK!

    hadoop-core-1.0.3.jar

    Exception in thread "main" java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Administrator\mapred\staging\Administrator1702422322\.staging to 0700 这个错误是win中开发特有的错误,文件...

    hadoop-core-1.1.1.jar

    12/04/24 15:32:44 ERROR security.UserGroupInformation: PriviledgedActionException as:Administrator cause:java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Administrator\mapred\...

    hadoop-core-1.2.2-SNAPSHOT.jar

    windows下搭建nutch会...java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Administrator\mapred\staging\Administrator606301699\.staging to 0700 此jar包是已经注释好 的然后从新编译的jar。

    hadoop-core-1.2.1.jar

    ERROR security.UserGroupInformation: PriviledgedActionException as:chuck cause:java.io.IOException: Failed to set permissions of path: 分析问题: 属于windows下的eclipse中访问的权限问题,需要重新打包...

    hadoop-core-1.1.2.jar修改版

    本包是为了解决在windows下通过cygwin运行hadoop时,执行tasktracker模块时报错Failed to set permissions of path: \mapred\local\ttprivate to 0700,通过修改源代码来解决的包。希望能该问题困扰的童鞋们,提供...

    HadoopHA集群 批量启动脚本

    HadoopHA集群 批量启动脚本HadoopHA集群 批量启动脚本HadoopHA集群 批量启动脚本HadoopHA集群 批量启动脚本

    格式化namenode时报错No Route to Host from node1/192.168.3.101 to hadoop05:8485 failed on socket timeout ex

    格式化namenode时 报错 No Route to Host from node1/192.168.3.101 to hadoop05:8485 failed on socket timeout exception: java.net.NoRouteToHostException: No route to host解决方案 一、报错信息概要: 在配置...

    hadoop访问权限问题 hadoop-core-1.1.2.jar

    Win环境下本地运行hadoop1版本出现访问权限问题,会遇到如下报错: Exception in thread "main" java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Administrator\mapred\staging\...

    hadoop-core-1.2.0

    解决hadoop运行在windows下的错误Exception in thread "main" java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Administrator\mapred\staging\Administrator606301699\.staging to 0700

    hadoop-core-1.2.0.jar

    解决nutch 1.9在cgywin中运行报Injector: java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Administrator\mapred\staging\Administrator139727905\.staging to 0700错误的问题,即修改hadoop-...

    Moving Hadoop to The Cloud epub

    Moving Hadoop to The Cloud 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除

    hadoop 高可用集群一键启动脚本

    hadoop 高可用启动脚本,运行启动zookeeper集群和hadoop ha集群

Global site tag (gtag.js) - Google Analytics