http://f.dataguru.cn/thread-138042-1-1.html
http://stackoverflow.com/questions/15585630/file-jobtracker-info-could-only-be-replicated-to-0-nodes-instead-of-1
http://www.iteye.com/topic/1120575
主要是报问题could only be replicated to 0 nodes, instead of 1
关闭防火墙service iptables stop 执行命令 iptables -I INPUT -s HD1 -p tcp -j ACCEPT
iptables -I INPUT -p tcp --dport 9000 -j ACCEPT
都没有解决!日志如下
2013-06-08 09:11:12,738 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:grid cause:java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
2013-06-08 09:11:12,738 INFO org.apache.hadoop.ipc.Server: IPC Server handler 3 on 9000, call addBlock(/opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info, DFSClient_NONMAPREDUCE_960999895_1, null) from 192.168.100.35:56400: error: java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1920)
at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:783)
at sun.reflect.GeneratedMethodAccessor6.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:587)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1432)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1428)
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:1190)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1426)
2013-06-08 09:11:13,784 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:grid cause:java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
2013-06-08 09:11:13,785 INFO org.apache.hadoop.ipc.Server: IPC Server handler 9 on 9000, call addBlock(/opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info, DFSClient_NONMAPREDUCE_960999895_1, null) from 192.168.100.35:56400: error: java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1920)
at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:783)
at sun.reflect.GeneratedMethodAccessor6.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:587)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1432)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1428)
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:1190)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1426)
2013-06-08 09:11:14,828 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:grid cause:java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
2013-06-08 09:11:14,828 INFO org.apache.hadoop.ipc.Server: IPC Server handler 5 on 9000, call addBlock(/opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info, DFSClient_NONMAPREDUCE_960999895_1, null) from 192.168.100.35:56400: error: java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1920)
at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:783)
at sun.reflect.GeneratedMethodAccessor6.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:587)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1432)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1428)
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:1190)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1426)
2013-06-08 09:11:15,861 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:grid cause:java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
2013-06-08 09:11:15,861 INFO org.apache.hadoop.ipc.Server: IPC Server handler 1 on 9000, call addBlock(/opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info, DFSClient_NONMAPREDUCE_960999895_1, null) from 192.168.100.35:56400: error: java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1920)
at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:783)
at sun.reflect.GeneratedMethodAccessor6.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:587)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1432)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1428)
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:1190)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1426)
2013-06-08 09:11:16,900 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:grid cause:java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
2013-06-08 09:11:16,900 INFO org.apache.hadoop.ipc.Server: IPC Server handler 6 on 9000, call addBlock(/opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info, DFSClient_NONMAPREDUCE_960999895_1, null) from 192.168.100.35:56400: error: java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1920)
at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:783)
at sun.reflect.GeneratedMethodAccessor6.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:587)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1432)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1428)
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:1190)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1426)
2013-06-08 09:11:17,934 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:grid cause:java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
2013-06-08 09:11:17,934 INFO org.apache.hadoop.ipc.Server: IPC Server handler 3 on 9000, call addBlock(/opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info, DFSClient_NONMAPREDUCE_960999895_1, null) from 192.168.100.35:56400: error: java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1920)
at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:783)
at sun.reflect.GeneratedMethodAccessor6.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:587)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1432)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1428)
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:1190)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1426)
2013-06-08 09:11:18,970 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:grid cause:java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
2013-06-08 09:11:18,971 INFO org.apache.hadoop.ipc.Server: IPC Server handler 0 on 9000, call addBlock(/opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info, DFSClient_NONMAPREDUCE_960999895_1, null) from 192.168.100.35:56400: error: java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1920)
at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:783)
at sun.reflect.GeneratedMethodAccessor6.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:587)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1432)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1428)
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:1190)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1426)
2013-06-08 09:11:20,005 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:grid cause:java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
2013-06-08 09:11:20,006 INFO org.apache.hadoop.ipc.Server: IPC Server handler 7 on 9000, call addBlock(/opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info, DFSClient_NONMAPREDUCE_960999895_1, null) from 192.168.100.35:56400: error: java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
java.io.IOException: File /opt/hadoop-1.2.0/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1920)
at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:783)
at sun.reflect.GeneratedMethodAccessor6.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:587)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1432)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1428)
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:1190)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1426)
求助!
本帖最后由 笑书 于 2013-6-11 01:03 编辑 解决办法: 1。在hadoop-config中修改hadoop-env.sh,添加:export HADOOP_PID_DIR=$HADOOP_HOME/run/tmp。改变pid的路径。3台机子一块改。 2。在/etc中修改profile,添加:export HADOOP_PID_DIR=$HADOOP_HOME/run/tmp,同样,改3台机子。重启: [grid@HD1 tmp]$ start-all.sh Warning: $HADOOP_HOME is deprecated. starting namenode, logging to /home/grid/hadoop/libexec/../logs/hadoop-grid-namenode-HD1.out 192.168.100.37: Warning: $HADOOP_HOME is deprecated. 192.168.100.37: 192.168.100.37: starting datanode, logging to /home/grid/hadoop/libexec/../logs/hadoop-grid-datanode-HD3.out 192.168.100.36: starting datanode, logging to /home/grid/hadoop/libexec/../logs/hadoop-grid-datanode-HD2.out 192.168.100.35: starting secondarynamenode, logging to /home/grid/hadoop/libexec/../logs/hadoop-grid-secondarynamenode-HD1.out starting jobtracker, logging to /home/grid/hadoop/libexec/../logs/hadoop-grid-jobtracker-HD1.out 192.168.100.37: Warning: $HADOOP_HOME is deprecated. 192.168.100.37: 192.168.100.36: starting tasktracker, logging to /home/grid/hadoop/libexec/../logs/hadoop-grid-tasktracker-HD2.out 192.168.100.37: starting tasktracker, logging to /home/grid/hadoop/libexec/../logs/hadoop-grid-tasktracker-HD3.out |