hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From exp <exception...@163.com>
Subject RegionServer unable to connect to master
Date Thu, 15 Dec 2011 09:00:24 GMT
hi all,
I am installing hbase on a small cluster of 3 machines. The RegionServer unable connect to
the master. This is the log:

2011-12-15 13:46:43,415 INFO org.apache.hadoop.hbase.regionserver.HRegionServer: Attempting
connect to Master server at localhost:60000
2011-12-15 13:47:43,473 WARN org.apache.hadoop.hbase.regionserver.HRegionServer: Unable to
connect to master. Retrying. Error was:
java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
        at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)

The lod shows this RegionServer connect to the master at a wrong address(localhost:60000).

as far as I know, the RegionServer use ZooKeeper to find out the master's address. so I check
the HMaster's log.

this is what i find out:
2011-12-15 13:44:34,946 INFO org.apache.hadoop.hbase.master.metrics.MasterMetrics: Initialized
2011-12-15 13:44:35,010 INFO org.apache.hadoop.hbase.master.ActiveMasterManager: Master=localhost:60000

2011-12-15 13:44:37,476 INFO org.apache.zookeeper.ZooKeeper: Initiating client connection,
1:2181 sessionTimeout=180000 watcher=hconnection

The HMaster starts at localhost:60000! I think the HMaster should start at master:60000. "master"
is the hosts where JobTracker runs.

I am using hbase 0.90.3 and zookeeper 3.3.4. This is the source code where the HMaster get
the address:

HServerAddress a = new HServerAddress(getMyAddress(this.conf));
int numHandlers = conf.getInt("hbase.regionserver.handler.count", 10);
this.rpcServer = HBaseRPC.getServer(this,
      new Class<?>[]{HMasterInterface.class, HMasterRegionInterface.class},
      a.getBindAddress(), a.getPort(),
      0, // we dont use high priority handlers in master
      false, conf,
      0); // this is a DNC w/o high priority handlers
this.address = new HServerAddress(rpcServer.getListenerAddress());

 private static String getMyAddress(final Configuration c)
  throws UnknownHostException {
    // Find out our address up in DNS.
    String s = DNS.getDefaultHost(c.get("hbase.master.dns.interface","default"),
    s += ":" + c.get(HConstants.MASTER_PORT,
    return s;

As you can see in the code, the HMaster find its address in DNS! I have no idea how to setup
the hbase to let the HMaster find the correct address.

this is my hbase-site.xml:





and all the three machines are virtual machine with Ubuntu 11.04

this is the /etc/hosts :
master:   localhost ubt   ubt ubuntu   master   slave1   slave2

slave1:       localhost       slave1  ubuntu   master   slave1   slave2

slave2:       localhost       slave2  ubuntu   master   slave1   slave2

any idea on this problems?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message