9

我正在尝试在 EC2 实例上设置 Hadoop 集群(CDH4)。当我尝试对其进行格式化时,名称节点不断崩溃。这是我得到的错误。

    2013-04-12 05:37:16,995 FATAL org.apache.hadoop.hdfs.server.namenode.NameNode: Exception in namenode join
java.net.BindException: Problem binding to [head.node.iec.project:8020] java.net.BindException: Cannot assign requested address; For more details see:  http://wiki.apache.org/hadoop/BindException
    at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:715)
    at org.apache.hadoop.ipc.Server.bind(Server.java:356)
    at org.apache.hadoop.ipc.Server$Listener.<init>(Server.java:454)
    at org.apache.hadoop.ipc.Server.<init>(Server.java:1835)
    at org.apache.hadoop.ipc.RPC$Server.<init>(RPC.java:970)
    at org.apache.hadoop.ipc.ProtobufRpcEngine$Server.<init>(ProtobufRpcEngine.java:375)
    at org.apache.hadoop.ipc.ProtobufRpcEngine.getServer(ProtobufRpcEngine.java:350)
    at org.apache.hadoop.ipc.RPC.getServer(RPC.java:695)
    at org.apache.hadoop.ipc.RPC.getServer(RPC.java:684)
    at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.<init>(NameNodeRpcServer.java:239)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createRpcServer(NameNode.java:453)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:435)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:609)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:590)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1141)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1205)
2013-04-12 05:37:16,998 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 1
2013-04-12 05:37:17,024 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: SHUTDOWN_MSG: 

主机文件看起来像这样

    127.0.0.1 localhost
184.73.62.190  head.node.iec.project head
54.244.75.141  node1.node.iec.project node1
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

有人可以帮我弄这个吗?

4

1 回答 1

12

我犯的错误是使用实例的公共 IP 而不是亚马逊分配的本地 IP (10.XXX)。这解决了这个问题。

于 2013-04-16T20:39:23.893 回答