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 7552A9E7D for ; Fri, 1 Jun 2012 09:05:07 +0000 (UTC) Received: (qmail 12438 invoked by uid 500); 1 Jun 2012 09:05:05 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 12198 invoked by uid 500); 1 Jun 2012 09:05:02 -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 12150 invoked by uid 99); 1 Jun 2012 09:05:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2012 09:05:00 +0000 X-ASF-Spam-Status: No, hits=2.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of syrious3000@hotmail.de designates 65.54.61.98 as permitted sender) Received: from [65.54.61.98] (HELO snt0-omc2-s47.snt0.hotmail.com) (65.54.61.98) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2012 09:04:51 +0000 Received: from SNT126-W17 ([65.55.90.71]) by snt0-omc2-s47.snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 1 Jun 2012 02:04:30 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_32faa23f-ebe9-48dd-ab89-9e1cac8d6ff1_" X-Originating-IP: [195.13.41.220] From: =?iso-8859-1?B?Q2hyaXN0aWFuIFNjaORmZXI=?= To: Subject: Re: Issues with Java sample for connecting to remote Hbase Date: Fri, 1 Jun 2012 11:04:32 +0200 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 01 Jun 2012 09:04:30.0321 (UTC) FILETIME=[8DCCDE10:01CD3FD5] --_32faa23f-ebe9-48dd-ab89-9e1cac8d6ff1_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ok then try to disable IPV6 in the config of your client and server. Some time ago I solved a network accessibility problem (also related to a r= emote hbase cluster) by editing /etc/sysctl.conf net.ipv6.conf.all.disable_ipv6 =3D 1 net.ipv6.conf.default.disable_ipv6 =3D 1 net.ipv6.conf.lo.disable_ipv6 =3D 1 Von: AnandaVelMurugan Chandra Mohan An: user@hbase.apache.org=20 Gesendet: 8:30 Freitag=2C 1.Juni 2012 Betreff: Re: Issues with Java sample for connecting to remote Hbase =20 Hi=2C I dont have firewall running. I have already turned it off (My server is Ubuntu. So I stopped ufw service). I removed localhost.localdomain completely from /etc/hosts file. But still it fails. On Thu=2C May 31=2C 2012 at 4:26 AM=2C Christian Sch=E4fer wrote: > > Hi=2C > > just double check that you use the correct IP / hostname by comparing to > what "ifconfig" output > and that hostname is resolved to correct ip by arp honeywel-4a7632 or pin= g > honeywel-4a7632. > > I recommend to uncomment the IPV6 line in your hosts files because I > experienced trouble with such entries and hadoop. > For example my hosts file (anonymized) used on all machines of a stable > HBase cluster looks as easy as that: > > 127.0.0.1 localhost.localdomain localhost > 195.55.55.555 hostname.domain.com hostname > > > As you were able to create tables and so on the hbase master seems to wor= k > otherwise there would be > evidence in the hbase logs at startup.. > I expect it's a network accessibility issue caused by a firewall setting. > > So maybe try (for test only) turning of iptables: > > service iptables save > service iptables stop > chkconfig iptables off > > > Good Luck > Chris > Von: AnandaVelMurugan Chandra Mohan > An: user@hbase.apache.org > Gesendet: 15:46 Dienstag=2C 29.Mai 2012 > Betreff: Re: Issues with Java sample for connecting to remote Hbase > > Thanks for the response. It still > errors out. > > On Tue=2C May 29=2C 2012 at 7:05 PM=2C Mohammad Tariq > wrote: > > > change the name from "localhost" to something else in the line > > "10.78.32.131 honeywel-4a7632 localhost" and see if it works > > > > Regards=2C > > Mohammad Tariq > > > > > > On Tue=2C May 29=2C 2012 at 6:59 PM=2C AnandaVelMurugan Chandra Mohan > > wrote: > > > I have HBase version 0.92.1 running in standalone mode. I created a > table > > > and added few rows using hbase shell. Now I am developing a standalon= e > > java > > > application to connect to Hbase and retrieve the data from the table. > > > * > > > This is the code I am using > > > > * > > > Configuration config =3D HBaseConfiguration.create()=3B > > > config.clear()=3B > > > config.set("hbase.zookeeper.quorum"=2C "10.78.32.131")= =3B > > > config.set("hbase.zookeeper.property.clientPort"=2C"218= 1")=3B > > > config.set("hbase.master"=2C "10.78.32.131:60010")=3B > > > > > > HBaseAdmin.checkHBaseAvailable(config)=3B > > > > > > > > > // This instantiates an HTable object that connects you > to > > > the "myTable" > > > =20 // table. > > > > HTable table =3D new HTable(config=2C "asset")=3B > > > > > > Get g =3D new Get(Bytes.toBytes("APU 331-350"))=3B > > > Result r =3D table.get(g)=3B > > > > > > *This is the content of my /etc/hosts file* > > > > > > #127.0.0.1 localhost.localdomain localhost > > > #10.78.32.131 honeywel-4a7632 > > > #127.0.1.1 honeywel-4a7632 > > > ::1 honeywel-4a7632 localhost6.localdomain6 localhost6 > > > 10.78.32.131 honeywel-4a7632 localhost > > > * > > > This is part of my error stack trace* > > > > > > 12/05/29 18:53:33 INFO > > client.HConnectionManager$HConnectionImplementation: > > > getMaster attempt 0 of 1 failed=3B no more retrying. > > > > java.net.ConnectException: Connection refused: no further information > > > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) > > > at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) > > > at > > > > > > org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.jav= a:206) > > > at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:489) > > > at > > > > > > org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupConnection(HBaseC= lient.java:328) > > > at > > > > > > org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupIOstreams(HBaseCli= ent.java:362) > > > at > > > > > > org.apache.hadoop.hbase.ipc.HBaseClient.getConnection(HBaseClient.java:10= 45) > > > at > org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:897) > > > at > > > > > > org.apache.hadoop.hbase.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcE= ngine.java:150) > > > at $Proxy5.getProtocolVersion(Unknown Source) > > > at > > > > > > org.apache.hadoop.hbase.ipc.WritableRpcEngine.getProxy(WritableRpcEngine.= java:183) > > > at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:303= ) > > > at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:280= ) > > > at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:332) > > > at > > > > > > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementati= on.getMaster(HConnectionManager.java:642) > > > at > > > org.apache.hadoop.hbase.client.HBaseAdmin.(HBaseAdmin.java:106) > > > at > > > > > > org.apache.hadoop.hbase.client.HBaseAdmin.checkHBaseAvailable(HBaseAdmin.= java:1553) > > > at hbaseMain.main(hbaseMain.java:27) > > > 12/05/29 18:53:33 INFO > > client.HConnectionManager$HConnectionImplementation: > > > Closed zookeeper sessionid=3D0x13798c3ce190003 > > > 12/05/29 18:53:33 INFO zookeeper.ZooKeeper: Session: 0x13798c3ce19000= 3 > > > closed > > > 12/05/29 18:53:33 INFO zookeeper.ClientCnxn: EventThread shut down > > > > > > Can some one help me fix this? Thanks a lot. > > > -- > > > Regards=2C > > > Anand > > > > > > -- > Regards=2C > Anand > --=20 Regards=2C Anand = --_32faa23f-ebe9-48dd-ab89-9e1cac8d6ff1_--