Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 349F29EA3 for ; Thu, 7 Jun 2012 09:11:41 +0000 (UTC) Received: (qmail 96257 invoked by uid 500); 7 Jun 2012 09:11:32 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 96182 invoked by uid 500); 7 Jun 2012 09:11:32 -0000 Mailing-List: contact mapreduce-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-user@hadoop.apache.org Delivered-To: mailing list mapreduce-user@hadoop.apache.org Received: (qmail 96140 invoked by uid 99); 7 Jun 2012 09:11:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jun 2012 09:11:31 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of manupkd87@gmail.com designates 209.85.215.48 as permitted sender) Received: from [209.85.215.48] (HELO mail-lpp01m010-f48.google.com) (209.85.215.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jun 2012 09:11:24 +0000 Received: by lagz14 with SMTP id z14so315435lag.35 for ; Thu, 07 Jun 2012 02:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=I3OIz0Ygldj6zLDNvJiRj+0tI2LCAL6hZZDaV+w/8MI=; b=d8Kaz0M9NfAEbgPPIBRmZh3KnQbaQ96XTeDKo/Yf7p6Iuu8geCR0MkPm/dX5vBJx22 atHiBRaOdy8SAg2smtX2SRB/h6yr1i45TS9PkYPMNBFFSc60TjYqqfFY6SVsnquvQBka Prm4RFX19H68JUm8+3Lc59rb/wxXwDeqvSpGwG9Z+fPWvF9rf0SlHcIxc3DDLXkkPbzm O+KxbodMgaVkMtcC9B8gpLwCDV121k+knO7cv1vd2twGODJifDVLlW3sN2E5lR1oZrJ9 FDdEtxQUjdqRWAOOxj6sljrMEpdjCPyrg3d3rbtQ4clWSJbnvxol2w5WQk58koNgTJeP 4FDw== MIME-Version: 1.0 Received: by 10.152.122.116 with SMTP id lr20mr1531890lab.42.1339060262782; Thu, 07 Jun 2012 02:11:02 -0700 (PDT) Received: by 10.112.18.137 with HTTP; Thu, 7 Jun 2012 02:11:02 -0700 (PDT) In-Reply-To: References: Date: Thu, 7 Jun 2012 14:41:02 +0530 Message-ID: Subject: Re: HBase is able to connect to ZooKeeper but the connection closes immediately From: Manu S To: user@hbase.apache.org, common-user@hadoop.apache.org, mapreduce-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=f46d042ef7294bc72e04c1de43b0 X-Virus-Checked: Checked by ClamAV on apache.org --f46d042ef7294bc72e04c1de43b0 Content-Type: text/plain; charset=ISO-8859-1 Hi Tariq, Thank you!! I already changed the maxClientCnxns to 1000. Also we have set CLASSPATH that includes all the Hadoop,HBase & Zookeper path's. I think copying hadoop .jar files to Hbase lib folder is the same affect of setting CLASSPATH with all the folders. There is no commons-configuration-*.jar inside hadoop/lib folder. Any other options? Thanks, Manu S On Thu, Jun 7, 2012 at 1:31 PM, Mohammad Tariq wrote: > Actually zookeeper servers have an active connections limit, which by > default is 30. You can increase this limit by setting maxClientCnxns > property accordingly in your zookeeper config file, zoo.cfg. For > example - maxClientCnxns=100....but before that copy the > hadoop-core-*.jar present inside hadoop folder to the hbase/lib > folder.Also copy commons-configuration-1.6.jar from hadoop/lib folder > to hbase/lib folder and check it once and see if it works for you. > > Regards, > Mohammad Tariq > > > On Thu, Jun 7, 2012 at 1:13 PM, Manu S wrote: > > Hi All, > > > > Thank you for your reply. > > > > I tried all these options but still I am facing this issue. > > > > @Mayank: I tried the same, but still getting error. > > export > > > HADOOP_CLASSPATH="/usr/lib/hadoop/:/usr/lib/hadoop/lib/:/usr/lib/hadoop/conf/" > > export > > > HBASE_CLASSPATH="/usr/lib/hbase/:/usr/lib/hbase/lib/:/usr/lib/hbase/conf/:/usr/lib/zookeeper/:/usr/lib/zookeeper/conf/:/usr/lib/zookeeper/lib/" > > export CLASSPATH="${HADOOP_CLASSPATH}:${HBASE_CLASSPATH}" > > > > @Marcos & Tariq: > > We are using Hbase version 0.90.4 > > Job creating single HBaseConfiguration object only > > > > @Kevin: > > No luck, same error > > > > > > Thanks, > > Manu S > > > > On Thu, Jun 7, 2012 at 3:50 AM, Mayank Bansal wrote: > > > >> > >> zookeeper conf is not on the class path for the mapreduce job. Add conf > >>> file to class path for the job. > >>> > >>> Thanks, > >>> Mayank > >>> > >>> > >>> On Wed, Jun 6, 2012 at 7: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.(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.(HConnectionManager.java:295) > >>>> at > org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:157) > >>>> at org.apache.hadoop.hbase.client.HTable.(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: > >>>> > >>>> > >>>> > >>>> > >>>> hbase.cluster.distributed > >>>> true > >>>> > >>>> > >>>> > >>>> hbase.rootdir > >>>> hdfs://namenode/hbase > >>>> > >>>> > >>>> > >>>> hbase.zookeeper.quorum > >>>> namenode > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> 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 > >>>> > >>> > >>> > >> > --f46d042ef7294bc72e04c1de43b0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Tariq,

Thank you!!
I already changed the maxClientCnxns to 100= 0.
Also we have set CLASSPATH that includes all the Hadoop,HBase & Z= ookeper path's. I think copying hadoop .jar files to Hbase lib folder i= s the same affect of setting CLASSPATH with all the folders.
There is no commons-configuration-*.jar inside hadoop/lib folder.

An= y other options?

Thanks,
Manu S

On Thu, Jun 7, 2012 at 1:31 PM, Mohammad Tariq <dontariq@gmail.com&g= t; wrote:
Actually zookeeper servers have an active co= nnections limit, which by
default is 30. You can increase this limit by setting maxClientCnxns
property accordingly in your zookeeper config file, zoo.cfg. For
example - maxClientCnxns=3D100....but before that copy the
hadoop-core-*.jar present inside hadoop folder to the hbase/lib
folder.Also copy commons-configuration-1.6.jar from hadoop/lib folder
to hbase/lib folder and check it once and see if it works for you.

Regards,
=A0=A0 =A0Mohammad Tariq


On Thu, Jun 7, 2012 at 1:13 PM, Manu S <manupkd87@gmail.com> wrote:
> Hi All,
>
> Thank you for your reply.
>
> I tried all these options but still I am facing this issue.
>
> @Mayank: I tried the same, but still getting error.
> export
> HADOOP_CLASSPATH=3D"/usr/lib/hadoop/:/usr/lib/hadoop/lib/:/usr/li= b/hadoop/conf/"
> export
> HBASE_CLASSPATH=3D"/usr/lib/hbase/:/usr/lib/hbase/lib/:/usr/lib/h= base/conf/:/usr/lib/zookeeper/:/usr/lib/zookeeper/conf/:/usr/lib/zookeeper/= lib/"
> export CLASSPATH=3D"${HADOOP_CLASSPATH}:${HBASE_CLASSPATH}"<= br> >
> @Marcos & Tariq:
> We are using Hbase version 0.90.4
> Job creating single HBaseConfiguration object only
>
> @Kevin:
> No luck, same error
>
>
> Thanks,
> Manu S
>
> On Thu, Jun 7, 2012 at 3:50 AM, Mayank Bansal <mayank@apache.org> wrote:
>
>>
>> zookeeper conf is not on the class path for the mapreduce job. Add= conf
>>> file to class path for the job.
>>>
>>> Thanks,
>>> Mayank
>>>
>>>
>>> On Wed, Jun 6, 2012 at 7:25 AM, Manu S <manupkd87@gmail.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> We are running a mapreduce job in a fully distributed clus= ter.The output
>>>> of the job is writing to HBase.
>>>>
>>>> While running this job we are getting an error:
>>>>
>>>> *Caused by: org.apache.hadoop.hbase.ZooKeeperC= onnectionException: HBase is able to connect to ZooKeeper but the connectio= n closes immediately. This could be a sign that the server has too many con= nections (30 is the default). Consider inspecting your ZK server logs for t= hat error and then make sure you are reusing HBaseConfiguration as often as= you can. See HTable's javadoc for more information.*
>>>> =A0 =A0 at org.apache.hadoop.hbase.zooke= eper.ZooKeeperWatcher.<init>(ZooKeeperWatcher.java:155)
>>>> =A0 =A0 at org.apache.hadoop.hbase.client.HConnectionManag= er$HConnectionImplementation.getZooKeeperWatcher(HConnectionManager.java:10= 02)
>>>> =A0 =A0 at org.apache.hadoop.hbase.client.HConnectionManag= er$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java= :304)
>>>> =A0 =A0 at org.apache.hadoop.hbase.client.HConnectionManag= er$HConnectionImplementation.<init>(HConnectionManager.java:295)
>>>> =A0 =A0 at org.apache.hadoop.hbase.client.HConnectionManag= er.getConnection(HConnectionManager.java:157)
>>>> =A0 =A0 at org.apache.hadoop.hbase.client.HTable.<init&= gt;(HTable.java:169)
>>>> =A0 =A0 at org.apache.hadoop.hbase.client.HTableFactory.cr= eateHTableInterface(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 HB= ase & 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=3D2000
>>>> # The number of ticks that the initial
>>>> # synchronization phase can take
>>>> initLimit=3D10
>>>> # The number of ticks that can pass between
>>>> # sending a request and getting an acknowledgement
>>>> syncLimit=3D5
>>>> # the directory where the snapshot is stored.
>>>> dataDir=3D/var/zookeeper
>>>> # the port at which the clients will connect
>>>> clientPort=3D2181
>>>> #server.0=3Dlocalhost:2888:3888
>>>> server.0=3Dnamenode:2888:3888
>>>>
>>>> ################# Max Client connections #################= ##
>>>> *maxClientCnxns=3D1000
>>>> minSessionTimeout=3D4000
>>>> maxSessionTimeout=3D40000*
>>>>
>>>>
>>>> It would be really great if anyone can help me to resolve = this issue by
>>>> giving your thoughts/suggestions.
>>>>
>>>> Thanks,
>>>> Manu S
>>>>
>>>
>>>
>>

--f46d042ef7294bc72e04c1de43b0--