Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 71D4E1016C for ; Fri, 31 Jan 2014 10:51:50 +0000 (UTC) Received: (qmail 88593 invoked by uid 500); 31 Jan 2014 10:51:48 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 88298 invoked by uid 500); 31 Jan 2014 10:51:47 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 88289 invoked by uid 99); 31 Jan 2014 10:51:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jan 2014 10:51:46 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jeevitesh.ms@gmail.com designates 209.85.219.49 as permitted sender) Received: from [209.85.219.49] (HELO mail-oa0-f49.google.com) (209.85.219.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jan 2014 10:51:42 +0000 Received: by mail-oa0-f49.google.com with SMTP id i7so4923936oag.8 for ; Fri, 31 Jan 2014 02:51:22 -0800 (PST) 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=v6igE9BzRu7ONGBCsWPDOZHGL64Hf12Z5JfQddJ2HGM=; b=aSObkYgkbEXoTxznSn0VooMYHtFS6Ao+kbrD631d4wZf1X8a2XIsRIda0pejsWmINV XxehFap/2gg3Yae3GtfkeCDVv62/OC79qM3sP2xRE774sCAyXjRsNdXdoInxsIDdVhko PY90JNVMK//vmhj2K2W8iJ45fTIC7Cf62v0WfRPz2bQBf7Xr47dLF6XOZTUp10RYpHxd RlUa1cchFUK+emtXKR8CI7tX7ADoW35zL7/Z7tfrAsXvS800Rusn7960iERSlIpijKBg NMqATr3IU+iCrWXjEs34WzDWZSEpHnW+f3efEd7nPV2GI/J3QrbBHGEAxyrPf7ZQgasA cWuA== MIME-Version: 1.0 X-Received: by 10.60.59.162 with SMTP id a2mr15701822oer.17.1391165481958; Fri, 31 Jan 2014 02:51:21 -0800 (PST) Received: by 10.76.81.35 with HTTP; Fri, 31 Jan 2014 02:51:21 -0800 (PST) In-Reply-To: References: <58498390-3173-4F3E-8960-A6965D62718D@gmail.com> Date: Fri, 31 Jan 2014 16:21:21 +0530 Message-ID: Subject: Re: help needed towards connecting Hbase From: jeevi tesh To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=089e013c5eb660487204f141f401 X-Virus-Checked: Checked by ClamAV on apache.org --089e013c5eb660487204f141f401 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Not able to understand what you referring can please explain bit more... Are asking me to add windows client machine ip address to quorum On Fri, Jan 31, 2014 at 3:50 PM, ramkrishna vasudevan < ramkrishna.s.vasudevan@gmail.com> wrote: > Your client side also you should have this. Are you using the same > machine/location for client also? > > > On Fri, Jan 31, 2014 at 3:38 PM, jeevi tesh > wrote: > > > Hi, > > Thanks for taking initiative to help me.. > > Note : my set up is single node cluster, so > > I added a entry in hbase-site.xml > > like > > > > hbase.zookeeper.quorum > > localhost > > > > But still almost same error persists > > and my /etc/hosts > > looks like > > 127.0.0.1 localhost.localdomain.com localhost > > 127.0.0.1 database.companyname.com database > > If you have noted any issue in using hbase-0.96.0-hadoop2 please let me > > know it will be very useful > > thanks > > > > > > > > On Fri, Jan 31, 2014 at 2:36 PM, Ted Yu wrote: > > > > > In the config, you should set zookeeper quorum > > > > > > BTW please use 0.96.1.1-hadoop2 release. > > > > > > Cheers > > > > > > On Jan 30, 2014, at 11:51 PM, jeevi tesh > wrote: > > > > > > > Hi all, > > > > > > > > I'm writing simple java program to connect to HBase. > > > > > > > > Versions of software used > > > > > > > > Hbase 0.96.0-hadoop2 > > > > > > > > Hadoop:hadoop-2.2.0. > > > > > > > > I'm trying to connect from my windows 7 (32 bit)machine to oracle > linux > > > > machine (Details :VM, 64 bit).Note I have not installed ZooKeeper. > > > > > > > > > > > > Any suggestion or comments will be of great help > > > > > > > > Thanks > > > > > > > > Here is the script... > > > > > > > > *package* pack1; > > > > > > > > > > > > > > > > *import* java.io.IOException; > > > > > > > > > > > > > > > > *import* org.apache.hadoop.conf.Configuration; > > > > > > > > *import* org.apache.hadoop.hbase.HBaseConfiguration; > > > > > > > > *import* org.apache.hadoop.hbase.client.HTable; > > > > > > > > *import* org.apache.hadoop.hbase.client.Put; > > > > > > > > *import* org.apache.hadoop.hbase.util.Bytes; > > > > > > > > > > > > > > > > *public* *class* testDB { > > > > > > > > > > > > > > > > /** > > > > > > > > * *@param* args > > > > > > > > */ > > > > > > > > *public* *static* *void* main(String[] args) { > > > > > > > > *try* { > > > > > > > > System.*out*.println("1 Before HBASE COnfiguration"); > > > > > > > > Configuration config =3D HBaseConfiguration.*create*(); > > > > > > > > config.clear(); > > > > > > > > System.*out*.println("2 Before HBASE COnfiguration"); > > > > > > > > config.set("hbase.master", "192.168.1.42:60010"); > > > > > > > > > > > > > > > > System.*out*.println("HBase is running!"); > > > > > > > > HTable table; > > > > > > > > > > > > > > > > table =3D *new* HTable(config, "mytable"); > > > > > > > > > > > > > > > > System.*out*.println("Table mytable obtained "); > > > > > > > > > > > > > > > > Put put =3D *new* Put(Bytes.*toBytes*("row1")); > > > > > > > > put.add(Bytes.*toBytes*("colfam1"),Bytes.*toBytes*("qual= 1" > > > > ),Bytes.*toBytes*("val1")); > > > > > > > > put.add(Bytes.*toBytes*("colfam1"),Bytes.*toBytes*("qual= 2" > > > > ),Bytes.*toBytes*("val2")); > > > > > > > > table.put(put); > > > > > > > > } *catch* (IOException e) { > > > > > > > > > > > > > > > > e.printStackTrace(); > > > > > > > > } > > > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > } > > > > > > > > Error message > > > > > > > > 1 Before HBASE COnfiguration > > > > > > > > 2 Before HBASE COnfiguration > > > > > > > > HBase is running! > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client > > > > environment:zookeeper.version=3D3.3.2-1031432, built on 11/05/2010 > 05:32 > > > GMT > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client environment: > > host.name > > > > =3DDELL-75.unilog > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client > > > > environment:java.version=3D1.6.0_16 > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client > > > > environment:java.vendor=3DSun Microsystems Inc. > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client > > > > environment:java.home=3DC:\Program Files\Java\jdk1.6.0_16\jre > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client > > > > > > > > > > environment:java.class.path=3DE:\jeevi\XRFWorkSpace200\testdbcon\bin;E:\j= eevi\XRF100\WebContent\WEB-INF\lib\apache-logging-log4j.jar;E:\jeevi\XRF100= \WebContent\WEB-INF\lib\asm-3.1.jar;E:\jeevi\XRF100\WebContent\WEB-INF\lib\= commons-logging-1.1.3.jar;E:\jeevi\XRF100\WebContent\WEB-INF\lib\hadoop-cor= e-0.19.0.jar;E:\jeevi\XRF100\WebContent\WEB-INF\lib\hbase-0.90.2.jar;E:\jee= vi\XRF100\WebContent\WEB-INF\lib\zookeeper-3.3.2.jar > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client > > > > environment:java.library.path=3DC:\Program > > > > > > > > > > Files\Java\jdk1.6.0_16\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;= C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windo= ws\System32\WindowsPowerShell\v1.0\;C:\Program > > > > Files\Common Files\Acronis\SnapAPI\;C:\Program > > > > Files\Java\jdk1.6.0_16\bin;C:\apache-maven-3.1.1\bin > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client > > > > environment:java.io.tmpdir=3DC:\Users\jems\AppData\Local\Temp\ > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client > > > > environment:java.compiler=3D > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client environment: > os.name > > > =3DWindows > > > > 7 > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client > > > environment:os.arch=3Dx86 > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client > > > > environment:os.version=3D6.1 > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client environment: > > user.name > > > > =3Djems > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client > > > > environment:user.home=3DC:\Users\jems > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Client > > > > environment:user.dir=3DE:\jeevi\XRFWorkSpace200\testdbcon > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ZooKeeper: Initiating client > > connection, > > > > connectString=3Dlocalhost:2181 sessionTimeout=3D180000 > watcher=3Dhconnection > > > > > > > > 14/01/31 13:14:55 INFO zookeeper.ClientCnxn: Opening socket > connection > > to > > > > server localhost/127.0.0.1:2181 > > > > > > > > 14/01/31 13:14:56 WARN zookeeper.ClientCnxn: Session 0x0 for server > > null, > > > > unexpected error, closing socket connection and attempting reconnec= t > > > > > > > > *java.net.ConnectException*: Connection refused: no further > information > > > > > > > > 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*) > > > > > > > > 14/01/31 13:14:56 INFO zookeeper.ClientCnxn: Opening socket > connection > > to > > > > server localhost/0:0:0:0:0:0:0:1:2181 > > > > > > > > 14/01/31 13:14:56 WARN zookeeper.ClientCnxn: Session 0x0 for server > > null, > > > > unexpected error, closing socket connection and attempting reconnec= t > > > > > > > > *java.net.SocketException*: Address family not supported by protoco= l > > > > family: connect > > > > > > > > at sun.nio.ch.Net.connect(*Native Method*) > > > > > > > > at > > > sun.nio.ch.SocketChannelImpl.connect(*SocketChannelImpl.java:507*) > > > > > > > > at org.apache.zookeeper.ClientCnxn$SendThread.startConnect( > > > > *ClientCnxn.java:1050*) > > > > > > > > at org.apache.zookeeper.ClientCnxn$SendThread.run( > > > > *ClientCnxn.java:1077*) > > > > > > > > 14/01/31 13:14:58 INFO zookeeper.ClientCnxn: Opening socket > connection > > to > > > > server localhost/127.0.0.1:2181 > > > > > > > > 14/01/31 13:14:59 WARN zookeeper.ClientCnxn: Session 0x0 for server > > null, > > > > unexpected error, closing socket connection and attempting reconnec= t > > > > > > > > *java.net.ConnectException*: Connection refused: no further > information > > > > > > > > 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*) > > > > > > > > 14/01/31 13:14:59 INFO zookeeper.ClientCnxn: Opening socket > connection > > to > > > > server localhost/0:0:0:0:0:0:0:1:2181 > > > > > > > > 14/01/31 13:14:59 WARN zookeeper.ClientCnxn: Session 0x0 for server > > null, > > > > unexpected error, closing socket connection and attempting reconnec= t > > > > > > > > *java.net.SocketException*: Address family not supported by protoco= l > > > > family: connect > > > > > > > > at sun.nio.ch.Net.connect(*Native Method*) > > > > > > > > at > > > sun.nio.ch.SocketChannelImpl.connect(*SocketChannelImpl.java:507*) > > > > > > > > at org.apache.zookeeper.ClientCnxn$SendThread.startConnect( > > > > *ClientCnxn.java:1050*) > > > > > > > > at org.apache.zookeeper.ClientCnxn$SendThread.run( > > > > *ClientCnxn.java:1077*) > > > > > > > > 14/01/31 13:15:00 INFO zookeeper.ClientCnxn: Opening socket > connection > > to > > > > server localhost/127.0.0.1:2181 > > > > > > > > 14/01/31 13:15:01 WARN zookeeper.ClientCnxn: Session 0x0 for server > > null, > > > > unexpected error, closing socket connection and attempting reconnec= t > > > > > > > > *java.net.ConnectException*: Connection refused: no further > information > > > > > > > > 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*) > > > > > > > > 14/01/31 13:15:02 INFO zookeeper.ClientCnxn: Opening socket > connection > > to > > > > server localhost/0:0:0:0:0:0:0:1:2181 > > > > > > > > 14/01/31 13:15:02 WARN zookeeper.ClientCnxn: Session 0x0 for server > > null, > > > > unexpected error, closing socket connection and attempting reconnec= t > > > > > > > > *java.net.SocketException*: Address family not supported by protoco= l > > > > family: connect > > > > > > > > at sun.nio.ch.Net.connect(*Native Method*) > > > > > > > > at > > > sun.nio.ch.SocketChannelImpl.connect(*SocketChannelImpl.java:507*) > > > > > > > > at org.apache.zookeeper.ClientCnxn$SendThread.startConnect( > > > > *ClientCnxn.java:1050*) > > > > > > > > at org.apache.zookeeper.ClientCnxn$SendThread.run( > > > > *ClientCnxn.java:1077*) > > > > > > > > 14/01/31 13:15:03 INFO zookeeper.ClientCnxn: Opening socket > connection > > to > > > > server localhost/127.0.0.1:2181 > > > > > > > > 14/01/31 13:15:04 WARN zookeeper.ClientCnxn: Session 0x0 for server > > null, > > > > unexpected error, closing socket connection and attempting reconnec= t > > > > > > > > *java.net.ConnectException*: Connection refused: no further > information > > > > > > > > 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*) > > > > > > > > 14/01/31 13:15:05 INFO zookeeper.ClientCnxn: Opening socket > connection > > to > > > > server localhost/0:0:0:0:0:0:0:1:2181 > > > > > > > > 14/01/31 13:15:05 WARN zookeeper.ClientCnxn: Session 0x0 for server > > null, > > > > unexpected error, closing socket connection and attempting reconnec= t > > > > > > > > *java.net.SocketException*: Address family not supported by protoco= l > > > > family: connect > > > > > > > > at sun.nio.ch.Net.connect(*Native Method*) > > > > > > > > at > > > sun.nio.ch.SocketChannelImpl.connect(*SocketChannelImpl.java:507*) > > > > > > > > at org.apache.zookeeper.ClientCnxn$SendThread.startConnect( > > > > *ClientCnxn.java:1050*) > > > > > > > > at org.apache.zookeeper.ClientCnxn$SendThread.run( > > > > *ClientCnxn.java:1077*) > > > > > > > > *org.apache.hadoop.hbase.ZooKeeperConnectionException*: > > > > *org.apache.hadoop.hbase.ZooKeeperConnectionException*: > > > > *org.apache.zookeeper.KeeperException$ConnectionLossException*: > > > > KeeperErrorCode =3D ConnectionLoss for /hbase > > > > > > > > at > > > > > > > > > > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementati= on.getZooKeeperWatcher( > > > > *HConnectionManager.java:1000*) > > > > > > > > at > > > > > > > > > > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementati= on.setupZookeeperTrackers( > > > > *HConnectionManager.java:303*) > > > > > > > > at > > > > > > > > > > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementati= on.( > > > > *HConnectionManager.java:294*) > > > > > > > > at > > org.apache.hadoop.hbase.client.HConnectionManager.getConnection( > > > > *HConnectionManager.java:156*) > > > > > > > > at > org.apache.hadoop.hbase.client.HTable.(*HTable.java:167*) > > > > > > > > at > org.apache.hadoop.hbase.client.HTable.(*HTable.java:145*) > > > > > > > > at pack1.testDB.main(*testDB.java:27*) > > > > > > > > Caused by: *org.apache.hadoop.hbase.ZooKeeperConnectionException*: > > > > *org.apache.zookeeper.KeeperException$ConnectionLossException*: > > > > KeeperErrorCode =3D ConnectionLoss for /hbase > > > > > > > > at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.( > > > > *ZooKeeperWatcher.java:147*) > > > > > > > > at > > > > > > > > > > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementati= on.getZooKeeperWatcher( > > > > *HConnectionManager.java:998*) > > > > > > > > ... 6 more > > > > > > > > Caused by: > > > *org.apache.zookeeper.KeeperException$ConnectionLossException*: > > > > KeeperErrorCode =3D ConnectionLoss for /hbase > > > > > > > > at org.apache.zookeeper.KeeperException.create( > > > > *KeeperException.java:90*) > > > > > > > > at org.apache.zookeeper.KeeperException.create( > > > > *KeeperException.java:42*) > > > > > > > > at org.apache.zookeeper.ZooKeeper.create(*ZooKeeper.java:637*) > > > > > > > > at org.apache.hadoop.hbase.zookeeper.ZKUtil.createAndFailSilen= t( > > > > *ZKUtil.java:902*) > > > > > > > > at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.( > > > > *ZooKeeperWatcher.java:133*) > > > > > > > > ... 7 more > > > > > > --089e013c5eb660487204f141f401--