|
|
-
Re: HBase is able to connect to ZooKeeper but the connection closes immediatelyMarcos Ortiz 2012-06-06, 21:05
Can you show us the code that you are developing?
Which HBase version are you using ? Yo should check if you are creating multiples HBaseConfiguration objects. The approach to this is to create one single HBaseConfiguration object and then reuse it in all your code. Regards On 06/06/2012 10:25 AM, Manu S wrote: > Hi All, > > We are running a mapreduce job in a fully distributed cluster.The > output of the job is writing to HBase. > > While running this job we are getting an error: > *Caused by: org.apache.hadoop.hbase.ZooKeeperConnectionException: HBase is able to connect to ZooKeeper but the connection closes immediately. This could be a sign that the server has too many connections (30 is the default). Consider inspecting your ZK server logs for that error and then make sure you are reusing HBaseConfiguration as often as you can. See HTable's javadoc for more information.* > at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.<init>(ZooKeeperWatcher.java:155) > at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getZooKeeperWatcher(HConnectionManager.java:1002) > at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:304) > at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:295) > at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:157) > at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:169) > at org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTableFactory.java:36) > > I had gone through some threads related to this issue and I modified > the *zoo.cfg* accordingly. These configurations are same in all the nodes. > Please find the configuration of HBase & ZooKeeper: > > Hbase-site.xml: > > <configuration> > > <property> > <name>hbase.cluster.distributed</name> > <value>true</value> > </property> > > <property> > <name>hbase.rootdir</name> > <value>hdfs://namenode/hbase</value> > </property> > > <property> > <name>hbase.zookeeper.quorum</name> > <value>namenode</value> > </property> > > </configuration> > > > Zoo.cfg: > > # The number of milliseconds of each tick > tickTime=2000 > # The number of ticks that the initial > # synchronization phase can take > initLimit=10 > # The number of ticks that can pass between > # sending a request and getting an acknowledgement > syncLimit=5 > # the directory where the snapshot is stored. > dataDir=/var/zookeeper > # the port at which the clients will connect > clientPort=2181 > #server.0=localhost:2888:3888 > server.0=namenode:2888:3888 > > ################# Max Client connections ################### > *maxClientCnxns=1000 > minSessionTimeout=4000 > maxSessionTimeout=40000* > > > It would be really great if anyone can help me to resolve this issue > by giving your thoughts/suggestions. > > Thanks, > Manu S -- Marcos Luis Ort�z Valmaseda Data Engineer&& Sr. System Administrator at UCI http://marcosluis2186.posterous.com http://www.linkedin.com/in/marcosluis2186 Twitter: @marcosluis2186 10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS INFORMATICAS... CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION http://www.uci.cu http://www.facebook.com/universidad.uci http://www.flickr.com/photos/universidad_uci |