Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BindException in Hadoop on EC2

I'm trying to setup a Hadoop cluster (CDH4) on EC2 instances. The namenode keeps crashing, when I try to format it. This is the error I get.

    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: 

THe hosts file looks like this

    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

Can someone help me with this?

like image 905
Pranesh Pandurangan Avatar asked Apr 12 '13 06:04

Pranesh Pandurangan


People also ask

What is Hdfs in AWS?

Hadoop Distributed File System (HDFS) – A distributed file system that runs on standard or low-end hardware. HDFS provides better data throughput than traditional file systems, in addition to high fault tolerance and native support of large datasets.


1 Answers

The mistake I made was to use the public IP of the instances instead of the Amazon allocated local IP (10.X.X.X). That fixed the issue.

like image 158
Pranesh Pandurangan Avatar answered Oct 08 '22 05:10

Pranesh Pandurangan