1

hi folks i am stucked in very strange problem.I am installing HBase and hadoop on another VM by accessing it from my machine.Now i have properly installed hadoop and then iran it ./start-all.sh and i see that all processes are running perfectly.So i do jps and i saw that
jobtracker
tasktracker
namenode
secondrynamenode
datanode

everything is running good.Now when I setup hbase and then started hadoop and Hbase , I saw that namenode is not running and in logs (from namenode log file) I got this exception

java.lang.InterruptedException: sleep interrupted
    at java.lang.Thread.sleep(Native Method)
    at org.apache.hadoop.hdfs.server.namenode.DecommissionManager$Monitor.run(DecommissionManager.java:65)
    at java.lang.Thread.run(Thread.java:662)
2012-05-19 08:46:07,493 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Number of transactions: 0 Total time for transactions(ms): 0Number of transactions batched in Syncs: 0 Number of syncs: 0 SyncTimes(ms): 0 
2012-05-19 08:46:07,516 ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: java.net.BindException: Problem binding to localhost/23.21.195.24:54310 : Cannot assign requested address
    at org.apache.hadoop.ipc.Server.bind(Server.java:227)
    at org.apache.hadoop.ipc.Server$Listener.<init>(Server.java:301)
    at org.apache.hadoop.ipc.Server.<init>(Server.java:1483)
    at org.apache.hadoop.ipc.RPC$Server.<init>(RPC.java:545)
    at org.apache.hadoop.ipc.RPC.getServer(RPC.java:506)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:294)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:497)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1268)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1277)
Caused by: java.net.BindException: Cannot assign requested address
    at sun.nio.ch.Net.bind(Native Method)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
    at org.apache.hadoop.ipc.Server.bind(Server.java:225)
    ... 8 more

2012-05-19 08:46:07,516 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: SHUTDOWN_MSG: 



i checked ports and revise all conf files again and again but didn't find the solution. Please guide me if anyone have an idea-
Thnaks alot

khan
  • 2,664
  • 8
  • 38
  • 64
  • If you type 'ping localhost' in a console, what does it show? I think it may be to do with localhost resolving to something other than 127.0.0.1: `localhost/23.21.195.24:54310` is what is in your logs. Have you amended the /etc/hosts file recently? – Chris White May 19 '12 at 13:33
  • yes i have amended - I put (23.21.195.24 hbase) entry in my /etc/hosts and i have commented my 127.0.01 localhost entry so my /etc/hosts file look likes (#127.0.01 localhost) -- (23.21.195.24 hbase xyz.hbase.com localhost) – khan May 19 '12 at 13:52
  • A suggestion for other people who get this error: make sure that you don't have a zombie process that's still bound to 9000. This is what happened to me just now. The first thing I did is run `jps -l` to see if the namenode was still running, but it wasn't showing up, so I ruled out the obvious diagnosis. I then wasted a lot of time trying to fix this, until I ran `netstat -nl | grep 9000` and I saw that something was, in fact, bound to 9000. – Mike Baranczak Nov 29 '12 at 03:26

1 Answers1

0

Based on your comment, you're probably is most probably related to the hosts file.

Firstly you should uncomment the 127.0.0.1 localhost entry, this is a fundamental entry.

Secondly, Have you set up hadoop and hbase to run with external accessible services - i'm not too up on hbase, but for hadoop, the services need to be bound to non-localhost addresses for external access, so your masters and slaves files in $HADOOP_HOME/conf need to name the actual machine names (or IP addresses if you don't have a DNS server). None of your configuration files should mention localhost, and should use either the host names or IP addresses.

Chris White
  • 29,949
  • 4
  • 71
  • 93