I agree with J-D and Shashwat. BTW, which version of Hadoop are you using?? Regards, Mohammad Tariq
On Thu, Dec 15, 2011 at 11:56 PM, shashwat shriparv <[email protected]> wrote: > make 127.0.1.1 to 127.0.0.1 that will solve lot of problems > > On Thu, Dec 15, 2011 at 11:54 PM, Jean-Daniel Cryans > <[email protected]>wrote: > >> Hi, >> >> A few notes: >> >> Remove the 127.0.1.1 lines, they usually mess things up. >> >> The hbase.master configuration has been removed from the HBase code >> more than 2 years ago, you can remove it too. >> >> Setting hbase.master.dns.interface alone without >> hbase.master.dns.nameserver doesn't do anything if I remember >> correctly, also I'm pretty sure you don't have an interface named >> "master", it's more likely "eth0" and whatnot. >> >> I don't know if this will fix your DNS resolution, but at least it >> will clean up a bit :) >> >> J-D >> >> 2011/12/15 exp <[email protected]>: >> > 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, connectString=master:2181,slave2:2181,slave >> > 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(), >> > numHandlers, >> > 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"), >> > c.get("hbase.master.dns.nameserver","default")); >> > s += ":" + c.get(HConstants.MASTER_PORT, >> > Integer.toString(HConstants.DEFAULT_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: >> > >> > >> > <configuration> >> > <property> >> > <name>hbase.rootdir</name> >> > <value>hdfs://master:9000/user/hadoop/hbase</value> >> > </property> >> > <property> >> > <name>hbase.cluster.distributed</name> >> > <value>true</value> >> > </property> >> > >> > >> > <property> >> > <name>hbase.master.dns.interface</name> >> > <value>master</value> >> > </property> >> > >> > >> > <property> >> > <name>zookeeper.znode.master</name> >> > <value>master</value> >> > </property> >> > >> > >> > <property> >> > <name>hbase.master</name> >> > <value>master:60000</value> >> > </property> >> > </configuration> >> > >> > >> > and all the three machines are virtual machine with Ubuntu 11.04 >> > >> > >> > this is the /etc/hosts : >> > master: >> > 127.0.0.1 localhost ubt >> > 127.0.0.1 ubt ubuntu >> > 10.66.201.243 master >> > 10.66.201.244 slave1 >> > 10.66.201.245 slave2 >> > >> > >> > slave1: >> > 127.0.0.1 localhost >> > 127.0.1.1 slave1 ubuntu >> > 10.66.201.243 master >> > 10.66.201.244 slave1 >> > 10.66.201.245 slave2 >> > >> > >> > slave2: >> > 127.0.0.1 localhost >> > 127.0.1.1 slave2 ubuntu >> > 10.66.201.243 master >> > 10.66.201.244 slave1 >> > 10.66.201.245 slave2 >> > >> > >> > any idea on this problems? >> > >> > >> > >> > >> > >> > >> > cheers >> > >> > >> > exception >> > > > > -- > Shashwat Shriparv > 09900059620 > 09663531241 > > > > <iframe src=" > http://rcm.amazon.com/e/cm?t=shriparv-20&o=1&p=48&l=ur1&category=kindlerotating&f=ifr" > width="728" height="90" scrolling="no" border="0" marginwidth="0" > style="border:none;" frameborder="0"></iframe>
