我在我的mac OS X中设置了hadoop框架。使用virtualbox,我安装了ubuntu服务器(一个nameNode)和另外两个ubuntu服务器作为datanode。
我已经根据我的知识正确设置了core-site.xml和其他配置。当我使用start-all.sh启动框架时,一切似乎都很好。在NameNode上执行jps
,每个数据节点都显示该进程处于活动状态。但是在GUI网址上,我看到没有节点存在。看附图。
以下是来自日志文件的错误消息:
2014-06-23 18:00:01,167 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: Web-server up at: 0.0.0.0:50070
2014-06-23 18:00:01,174 INFO org.apache.hadoop.ipc.Server: IPC Server Responder: starting
2014-06-23 18:00:01,175 INFO org.apache.hadoop.ipc.Server: IPC Server listener on 10001: starting
2014-06-23 18:00:01,178 INFO org.apache.hadoop.ipc.Server: IPC Server handler 0 on 10001: starting
2014-06-23 18:00:01,186 INFO org.apache.hadoop.ipc.Server: IPC Server handler 1 on 10001: starting
2014-06-23 18:00:01,190 INFO org.apache.hadoop.ipc.Server: IPC Server handler 2 on 10001: starting
2014-06-23 18:00:01,195 INFO org.apache.hadoop.ipc.Server: IPC Server handler 3 on 10001: starting
2014-06-23 18:00:01,195 INFO org.apache.hadoop.ipc.Server: IPC Server handler 4 on 10001: starting
2014-06-23 18:00:01,196 INFO org.apache.hadoop.ipc.Server: IPC Server handler 5 on 10001: starting
2014-06-23 18:00:01,198 INFO org.apache.hadoop.ipc.Server: IPC Server handler 6 on 10001: starting
2014-06-23 18:00:01,201 INFO org.apache.hadoop.ipc.Server: IPC Server handler 7 on 10001: starting
2014-06-23 18:00:01,206 INFO org.apache.hadoop.ipc.Server: IPC Server handler 8 on 10001: starting
2014-06-23 18:00:01,213 INFO org.apache.hadoop.ipc.Server: IPC Server handler 9 on 10001: starting
2014-06-23 18:00:05,692 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:sridhar cause:java.io.IOException: File /usr/local/hadoop/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
2014-06-23 18:00:05,692 INFO org.apache.hadoop.ipc.Server: IPC Server handler 4 on 10001, call addBlock(/usr/local/hadoop/tmp/mapred/system/jobtracker.info, DFSClient_NONMAPREDUCE_1288778011_1, null) from 127.0.0.1:56524: error: java.io.IOException: File /usr/local/hadoop/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
java.io.IOException: File /usr/local/hadoop/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.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1426)
2014-06-23 18:00:06,716 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:sridhar cause:java.io.IOException: File /usr/local/hadoop/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
2014-06-23 18:00:06,716 INFO org.apache.hadoop.ipc.Server: IPC Server handler 0 on 10001, call addBlock(/usr/local/hadoop/tmp/mapred/system/jobtracker.info, DFSClient_NONMAPREDUCE_1288778011_1, null) from 127.0.0.1:56524: error: java.io.IOException: File /usr/local/hadoop/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
PS:我确实在寻找其他显示类似错误的帖子。我试过了。但没有成功
编辑:
namenode服务器在发出jps
命令时不显示datanode和tasktracker。
datanode上的日志如下所示:(可能datanode没有建立连接)
2014-06-23 17:14:16,003 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: ubuntuhadoop/69.91.135.178:10001. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
2014-06-23 17:14:17,005 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: ubuntuhadoop/69.91.135.178:10001. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
2014-06-23 17:14:18,006 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: ubuntuhadoop/69.91.135.178:10001. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
答案 0 :(得分:1)
我让这个工作。虽然解决方案是微不足道的,但我想在此发布,以便其他新手Hadoopers可能会受益。
1)在主(core-site.xml
)和所有从属(hdfs-site.xml
)中都拥有mapred-site.xml
,nameNode
和dataNodes
的完全副本。我认为高手中的core-site.xml
和mapred-site.xml
并不重要。但它是。他们打开他们听的端口。在这些端口上,dataNode
可以达到nameNode
。
2)当您在master上运行jps
时,您将看不到DataNodes
和TaskTracker
的进程(至少我没有看到),假设您执行了start-all.sh
主。原因是因为DataNodes和TaskTrackers线程在集群的不同节点上处理(在我的例子中,我有一个ubuntu盒作为主节点,两个ubuntu盒作为datanode)。
注意:在我的情况下,我没有让我的主人充当datanode(即作为奴隶)
答案 1 :(得分:0)
从日志中可以看出,您的主节点无法连接其中一个数据节点(ubuntuhadoop / 69.91.135.178:10001)。
作为初始测试,请从主服务器ssh到数据节点,看看是否可以连接它。 以下链接可能有助于设置群集!!
http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-multi-node-cluster/