[Nutch]问题解决:Exception in thread "main" java.io.IOException: Failed to set permissions of path

时间:2022-10-30 08:33:36

1. 问题描述

在运行Nutch的时候可能会遇到如下问题:
Exception in thread “main” java.io.IOException:Failed to set permissions of path:\tmp\hadoop-Kandy Ye\mapred\staging\Kandy Ye1703726604.staging to 0700

2. 解决方法

  1. 下载并解压hadoop-1.2.1.tar.gz

  2. 修改hadoop-1.2.1\src\core\org\apache\hadoop\fs\FileUtil.java,搜索 Failed to set permissions of path,找到691行,把throw new IOException改为LOG.warn
    [Nutch]问题解决:Exception in thread "main" java.io.IOException: Failed to set permissions of path

  3. 修改hadoop-1.2.1\build.xml,搜索autoreconf,移除匹配的6个executable=”autoreconf”的exec配置.

  4. 下载解压ant,将ant目录下的bin目录加入环境变量path.

  5. 在Cygwin命令下行切换到hadoop-1.2.1目录,执行ant.
    [Nutch]问题解决:Exception in thread "main" java.io.IOException: Failed to set permissions of path

  6. 用新生成的hadoop-1.2.1\build\hadoop-core-1.2.1-SNAPSHOT.jar替换nutch的lib目录下的hadoop-core-1.0.3.jar,需要重命名为hadoop-core-1.0.3.jar。
    [Nutch]问题解决:Exception in thread "main" java.io.IOException: Failed to set permissions of path