hadoop集群 - 升级后的权限错误

时间:2012-01-31 07:23:56

标签: hadoop

将我的群集升级到hadoop-1.0.0后,无法成功运行任何作业。我的jobtracker日志中出现以下错误:

2012-01-31 10:25:13,558 INFO org.apache.hadoop.mapred.TaskInProgress: Error from attempt_201201310126_0002_m_000005_0: Error initializing attempt_201201310126_0002_m_000005_0:
ENOENT: No such file or directory
        at org.apache.hadoop.io.nativeio.NativeIO.chmod(Native Method)
        at org.apache.hadoop.fs.FileUtil.execSetPermission(FileUtil.java:692)
        at org.apache.hadoop.fs.FileUtil.setPermission(FileUtil.java:647)
        at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:509)
        at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:344)
        at org.apache.hadoop.mapred.JobLocalizer.initializeJobLogDir(JobLocalizer.java:239)
        at org.apache.hadoop.mapred.DefaultTaskController.initializeJob(DefaultTaskController.java:196)
        at org.apache.hadoop.mapred.TaskTracker$4.run(TaskTracker.java:1209)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:396)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1083)
        at org.apache.hadoop.mapred.TaskTracker.initializeJob(TaskTracker.java:1184)
        at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:1099)
        at org.apache.hadoop.mapred.TaskTracker$5.run(TaskTracker.java:2382)
        at java.lang.Thread.run(Thread.java:662)

2012-01-31 10:25:13,558 ERROR org.apache.hadoop.mapred.TaskStatus: Trying to set finish time for task attempt_201201310126_0002_m_000005_0 when no start time is set, stackTrace is : java.lang.Exception
        at org.apache.hadoop.mapred.TaskStatus.setFinishTime(TaskStatus.java:145)
        at org.apache.hadoop.mapred.TaskInProgress.incompleteSubTask(TaskInProgress.java:670)
        at org.apache.hadoop.mapred.JobInProgress.failedTask(JobInProgress.java:2942)
        at org.apache.hadoop.mapred.JobInProgress.updateTaskStatus(JobInProgress.java:1159)
        at org.apache.hadoop.mapred.JobTracker.updateTaskStatuses(JobTracker.java:4739)
        at org.apache.hadoop.mapred.JobTracker.processHeartbeat(JobTracker.java:3683)
        at org.apache.hadoop.mapred.JobTracker.heartbeat(JobTracker.java:3378)
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:563)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1384)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:396)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1083)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1382)

我的mapreduce日志也有类似的错误:

12/01/31 10:25:44 WARN mapred.JobClient: Error reading task outputhttp://hadoop2:50060/tasklog?plaintext=true&attemptid=attempt_201201310126_0002_r_000000_1&filter=stdout
12/01/31 10:25:44 WARN mapred.JobClient: Error reading task outputhttp://hadoop2:50060/tasklog?plaintext=true&attemptid=attempt_201201310126_0002_r_000000_1&filter=stderr
12/01/31 10:25:47 INFO mapred.JobClient: Task Id : attempt_201201310126_0002_m_000004_2, Status : FAILED
Error initializing attempt_201201310126_0002_m_000004_2:
ENOENT: No such file or directory
        at org.apache.hadoop.io.nativeio.NativeIO.chmod(Native Method)
        at org.apache.hadoop.fs.FileUtil.execSetPermission(FileUtil.java:692)
        at org.apache.hadoop.fs.FileUtil.setPermission(FileUtil.java:647)
        at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:509)
        at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:344)
        at org.apache.hadoop.mapred.JobLocalizer.initializeJobLogDir(JobLocalizer.java:239)
        at org.apache.hadoop.mapred.DefaultTaskController.initializeJob(DefaultTaskController.java:196)
        at org.apache.hadoop.mapred.TaskTracker$4.run(TaskTracker.java:1209)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:396)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1083)
        at org.apache.hadoop.mapred.TaskTracker.initializeJob(TaskTracker.java:1184)
        at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:1099)
        at org.apache.hadoop.mapred.TaskTracker$5.run(TaskTracker.java:2382)
        at java.lang.Thread.run(Thread.java:662)

在我看来,这是一个与权限相关的问题,但我不知道这些问题应该在哪里修复。

我的第一个猜测是检查我的$ {mapred.system.dir}对HDFS的权限,但它们似乎很好,更重要的是 - 失败作业的作业文件正在成功创建。唯一的问题是“attempt_ *”文件。

有人能指出我合理的解决方案吗?

0 个答案:

没有答案