Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E5DFE94DE for ; Thu, 8 Mar 2012 08:36:28 +0000 (UTC) Received: (qmail 19987 invoked by uid 500); 8 Mar 2012 08:36:03 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 17241 invoked by uid 500); 8 Mar 2012 08:35:45 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 16602 invoked by uid 99); 8 Mar 2012 08:35:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 08:35:29 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of anilgupta84@gmail.com designates 74.125.82.169 as permitted sender) Received: from [74.125.82.169] (HELO mail-we0-f169.google.com) (74.125.82.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 08:35:22 +0000 Received: by werj55 with SMTP id j55so182081wer.14 for ; Thu, 08 Mar 2012 00:35:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=Skyu1MjHeidWAnhYTTrzyt1+NhcAEYuVV/hhhIyKh8Y=; b=r+iEcyJ7GUJTKtCNP/P+yk1BdS0k7tul62RR3bf9MOxSgk0agnh8M3FUqBzORNVW3Q Hu3kyl9B+zU+mGqJif0Uxq8SPTFfMpXXDgvebczuYBL5TL6USUC/Y9M042n6kAHLAgDa zZ+bDLArfcyKTZwO4kIak1uT7XRnIvURnTuW80gjNsPABkVoFSTY3axvh6vhzD/wTQ4Q PhRZ3uUIRCPYKEOqTN+yjHOa94u9W0Rf2prrDmevFeDTeR36CkLHCB8WttXq179IthvG kuW0QtjYOvWwsOe2yhmRQvWlzcFInGslGLGGSw3D+V/gedaIbmt/bSj4bRtIsqx5zAEm YHVA== Received: by 10.180.90.225 with SMTP id bz1mr33180336wib.5.1331195702100; Thu, 08 Mar 2012 00:35:02 -0800 (PST) MIME-Version: 1.0 Sender: anilgupta84@gmail.com Received: by 10.180.85.98 with HTTP; Thu, 8 Mar 2012 00:34:41 -0800 (PST) In-Reply-To: References: From: anil gupta Date: Thu, 8 Mar 2012 00:34:41 -0800 X-Google-Sender-Auth: xU4vJYXTeC4z6IHr1GYOwlZrBxY Message-ID: Subject: Re: Problem in using HBase Bulk Load To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=f46d043be006f343f404bab7269f X-Virus-Checked: Checked by ClamAV on apache.org --f46d043be006f343f404bab7269f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Jonathan, Thanks for your reply. Fortunaltely, i fixed the problem by removing 127.0.0.1 from etc/hosts file and added the conf directory in Hadoop_Classpath. Thanks, Anil Gupta On Thu, Mar 8, 2012 at 12:18 AM, Jonathan Hsieh wrote: > Hi Anil, > > Looks like the zookeeper information isn't in your classpath when using t= he > hadoop command line. You may want to either add /etc/zookeeper/conf to y= ou > class path (possibly by prefacing the import command with > HADOOP_CLASSPATH=3D/etc/zookeeper/conf), or add xml style zookeeper confi= g > settings to your hbase-site.xml file. > > http://hbase.apache.org/book.html#zookeeper > > Jon. > > On Fri, Mar 2, 2012 at 9:48 AM, anil gupta wrote: > > > Hi All, > > > > I am using cdh3u2(hbase version:0.90.4-cdh3u2). > > > > I am able to perform CRUD operation in Hbase through its shell and On t= he > > web console also it doesn't reports any problem. I also imported data > into > > HBase with help of Sqoop and it works fine without any problem. > > > > In my cluster i have 3 nodes running tasktracker, datanode, > > hbase-regionserver; 1 node running namenode, hbase-master; 1 node runni= ng > > jobtracker, zookeeper-server. > > I have only 1 zookeeper server in my quorum. Following is the > configuration > > of my zoo.cfg file: > > tickTime=3D2000 > > dataDir=3D/var/zookeeper > > clientPort=3D2181 > > server.0=3Dzookeeper-hostname:2888:3888 > > > > The above file is present across the cluster in /etc/zookeeper/ folder. > > > > My hbase-site.xml has the following property for zookeeper: > > > > hbase.zookeeper.quorum > > ihub-jobtracker1 > > > > > > > > PROBLEM: When i run the bulk load it tries to connect to zookeeper serv= er > > at 127.0.0.1:2181. This is incorrect. It should connect to > > "zookeeper-hostname:2181". Please provide me pointers in resolving this > > problem. Appreciate your help. > > > > > > Here is the command i run for bulk_loading: > > sudo -u hdfs hadoop jar /usr/lib/hbase/hbase-0.90.4-cdh3u2.jar importts= v > > > > > -Dimporttsv.columns=3DHBASE_ROW_KEY,info:APPDATE,info:CANCELREASON,info:C= URRENTSTATUS > > account_data1 /user/hdfs/account_data1 '-Dimporttsv.separator=3D,' > > > > Here is the console log after running the above command: > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client > > environment:zookeeper.version=3D3.3.3-cdh3u2--1, built on 10/14/2011 05= :17 > > GMT > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client environment:host.nam= e > > =3Dihub-namenode1 > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client > > environment:java.version=3D1.6.0_20 > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client > > environment:java.vendor=3DSun Microsystems Inc. > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client > > environment:java.home=3D/usr/java/jdk1.6.0_20/jre > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client > > > > > environment:java.class.path=3D/usr/lib/hadoop-0.20/conf:/usr/java/jdk1.6.= 0_20/jre//lib/tools.jar:/usr/lib/hadoop-0.20:/usr/lib/hadoop-0.20/hadoop-co= re-0.20.2-cdh3u2.jar:/usr/lib/hadoop-0.20/lib/ant-contrib-1.0b3.jar:/usr/li= b/hadoop-0.20/lib/aspectjrt-1.6.5.jar:/usr/lib/hadoop-0.20/lib/aspectjtools= -1.6.5.jar:/usr/lib/hadoop-0.20/lib/commons-cli-1.2.jar:/usr/lib/hadoop-0.2= 0/lib/commons-codec-1.4.jar:/usr/lib/hadoop-0.20/lib/commons-daemon-1.0.1.j= ar:/usr/lib/hadoop-0.20/lib/commons-el-1.0.jar:/usr/lib/hadoop-0.20/lib/com= mons-httpclient-3.1.jar:/usr/lib/hadoop-0.20/lib/commons-logging-1.0.4.jar:= /usr/lib/hadoop-0.20/lib/commons-logging-api-1.0.4.jar:/usr/lib/hadoop-0.20= /lib/commons-net-1.4.1.jar:/usr/lib/hadoop-0.20/lib/core-3.1.1.jar:/usr/lib= /hadoop-0.20/lib/guava-r06.jar:/usr/lib/hadoop-0.20/lib/hadoop-fairschedule= r-0.20.2-cdh3u2.jar:/usr/lib/hadoop-0.20/lib/hsqldb-1.8.0.10.jar:/usr/lib/h= adoop-0.20/lib/jackson-core-asl-1.5.2.jar:/usr/lib/hadoop-0.20/lib/jackson-= mapper-asl-1.5.2.jar:/usr/lib/hadoop-0.20/lib/jasper-compiler-5.5.12.jar:/u= sr/lib/hadoop-0.20/lib/jasper-runtime-5.5.12.jar:/usr/lib/hadoop-0.20/lib/j= ets3t-0.6.1.jar:/usr/lib/hadoop-0.20/lib/jetty-6.1.26.cloudera.1.jar:/usr/l= ib/hadoop-0.20/lib/jetty-servlet-tester-6.1.26.cloudera.1.jar:/usr/lib/hado= op-0.20/lib/jetty-util-6.1.26.cloudera.1.jar:/usr/lib/hadoop-0.20/lib/jsch-= 0.1.42.jar:/usr/lib/hadoop-0.20/lib/junit-4.5.jar:/usr/lib/hadoop-0.20/lib/= kfs-0.2.2.jar:/usr/lib/hadoop-0.20/lib/log4j-1.2.15.jar:/usr/lib/hadoop-0.2= 0/lib/mockito-all-1.8.2.jar:/usr/lib/hadoop-0.20/lib/oro-2.0.8.jar:/usr/lib= /hadoop-0.20/lib/servlet-api-2.5-20081211.jar:/usr/lib/hadoop-0.20/lib/serv= let-api-2.5-6.1.14.jar:/usr/lib/hadoop-0.20/lib/slf4j-api-1.4.3.jar:/usr/li= b/hadoop-0.20/lib/slf4j-log4j12-1.4.3.jar:/usr/lib/hadoop-0.20/lib/xmlenc-0= .52.jar:/usr/lib/hadoop-0.20/lib/zookeeper.jar:/usr/lib/hadoop-0.20/lib/jsp= -2.1/jsp-2.1.jar:/usr/lib/hadoop-0.20/lib/jsp-2.1/jsp-api-2.1.jar:/usr/lib/= hadoop/lib:/usr/lib/hbase/lib:/usr/lib/sqoop/lib > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client > > > > > environment:java.library.path=3D/usr/java/jdk1.6.0_20/jre/lib/amd64/serve= r:/usr/java/jdk1.6.0_20/jre/lib/amd64:/usr/java/jdk1.6.0_20/jre/../lib/amd6= 4:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client > > environment:java.io.tmpdir=3D/tmp > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client > > environment:java.compiler=3D > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client environment:os.name > > =3DLinux > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client > > environment:os.arch=3Damd64 > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client > > environment:os.version=3D2.6.32-71.el6.x86_64 > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client environment:user.nam= e > > =3Dhdfs > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client > > environment:user.home=3D/usr/lib/hadoop-0.20 > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Client > > environment:user.dir=3D/etc/hbase/conf > > 12/03/02 09:40:27 INFO zookeeper.ZooKeeper: Initiating client connectio= n, > > connectString=3Dlocalhost:2181 sessionTimeout=3D180000 watcher=3Dhconne= ction > > 12/03/02 09:40:27 INFO zookeeper.ClientCnxn: Opening socket connection = to > > server localhost/127.0.0.1:2181 > > 12/03/02 09:40:27 WARN zookeeper.ClientCnxn: Session 0x0 for server nul= l, > > unexpected error, closing socket connection and attempting reconnect > > java.net.ConnectException: Connection refused > > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) > > at > > sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574) > > at > > org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119) > > 12/03/02 09:40:28 INFO zookeeper.ClientCnxn: Opening socket connection = to > > server localhost/127.0.0.1:2181 > > 12/03/02 09:40:28 WARN zookeeper.ClientCnxn: Session 0x0 for server nul= l, > > unexpected error, closing socket connection and attempting reconnect > > java.net.ConnectException: Connection refused > > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) > > at > > sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574) > > at > > org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119) > > 12/03/02 09:40:30 INFO zookeeper.ClientCnxn: Opening socket connection = to > > server localhost/127.0.0.1:2181 > > 12/03/02 09:40:30 WARN zookeeper.ClientCnxn: Session 0x0 for server nul= l, > > unexpected error, closing socket connection and attempting reconnect > > java.net.ConnectException: Connection refused > > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) > > at > > sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574) > > at > > org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119) > > 12/03/02 09:40:32 INFO zookeeper.ClientCnxn: Opening socket connection = to > > server localhost/127.0.0.1:2181 > > 12/03/02 09:40:32 WARN zookeeper.ClientCnxn: Session 0x0 for server nul= l, > > unexpected error, closing socket connection and attempting reconnect > > java.net.ConnectException: Connection refused > > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) > > at > > sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574) > > at > > org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119) > > 12/03/02 09:40:33 INFO zookeeper.ClientCnxn: Opening socket connection = to > > server localhost/127.0.0.1:2181 > > 12/03/02 09:40:33 WARN zookeeper.ClientCnxn: Session 0x0 for server nul= l, > > unexpected error, closing socket connection and attempting reconnect > > java.net.ConnectException: Connection refused > > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) > > at > > sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574) > > at > > org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119) > > 12/03/02 09:40:35 INFO zookeeper.ClientCnxn: Opening socket connection = to > > server localhost/127.0.0.1:2181 > > 12/03/02 09:40:35 WARN zookeeper.ClientCnxn: Session 0x0 for server nul= l, > > unexpected error, closing socket connection and attempting reconnect > > java.net.ConnectException: Connection refused > > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) > > at > > sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574) > > at > > org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119) > > 12/03/02 09:40:36 INFO zookeeper.ClientCnxn: Opening socket connection = to > > server localhost/127.0.0.1:2181 > > 12/03/02 09:40:36 WARN zookeeper.ClientCnxn: Session 0x0 for server nul= l, > > unexpected error, closing socket connection and attempting reconnect > > java.net.ConnectException: Connection refused > > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) > > at > > sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574) > > at > > org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119) > > 12/03/02 09:40:38 INFO zookeeper.ClientCnxn: Opening socket connection = to > > server localhost/127.0.0.1:2181 > > 12/03/02 09:40:38 WARN zookeeper.ClientCnxn: Session 0x0 for server nul= l, > > unexpected error, closing socket connection and attempting reconnect > > java.net.ConnectException: Connection refused > > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) > > at > > sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574) > > at > > org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119) > > 12/03/02 09:40:39 INFO zookeeper.ZooKeeper: Session: 0x0 closed > > 12/03/02 09:40:39 ERROR mapreduce.TableOutputFormat: > > 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 ar= e > > reusing HBaseConfiguration as often as you can. See HTable's javadoc fo= r > > more information. > > 12/03/02 09:40:39 INFO zookeeper.ClientCnxn: EventThread shut down > > 12/03/02 09:40:39 INFO input.FileInputFormat: Total input paths to > process > > : 1 > > 12/03/02 09:40:39 WARN util.NativeCodeLoader: Unable to load > native-hadoop > > library for your platform... using builtin-java classes where applicabl= e > > 12/03/02 09:40:39 WARN snappy.LoadSnappy: Snappy native library not > loaded > > > > > > -- > > Thanks & Regards, > > Anil Gupta > > > > > > -- > // Jonathan Hsieh (shay) > // Software Engineer, Cloudera > // jon@cloudera.com > --=20 Thanks & Regards, Anil Gupta --f46d043be006f343f404bab7269f--