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 B26D217480 for ; Mon, 29 Sep 2014 15:22:08 +0000 (UTC) Received: (qmail 25125 invoked by uid 500); 29 Sep 2014 15:22:06 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 25058 invoked by uid 500); 29 Sep 2014 15:22:06 -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 25045 invoked by uid 99); 29 Sep 2014 15:22:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2014 15:22:06 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [199.79.62.154] (HELO md-29.webhostbox.net) (199.79.62.154) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2014 15:22:00 +0000 Received: from mailnull by md-29.webhostbox.net with sa-checked (Exim 4.82) (envelope-from ) id 1XYclg-000yJG-2L for user@hbase.apache.org; Mon, 29 Sep 2014 15:21:40 +0000 Received: from [115.112.64.18] (port=33652 helo=[10.255.1.23]) by md-29.webhostbox.net with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1XYcle-000yDo-SI for user@hbase.apache.org; Mon, 29 Sep 2014 15:21:39 +0000 Message-ID: <542978FF.2040206@datametica.com> Date: Mon, 29 Sep 2014 20:51:35 +0530 From: SACHINGUPTA User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: user@hbase.apache.org Subject: Re: Access hbase remotely from java client References: <542953FA.40606@datametica.com> <2E3C384C-2441-459C-AB45-4468F87B077E@gmail.com> <54295BCE.8060000@datametica.com> <542972DC.8010705@datametica.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: sachin@datametica.com X-OutGoing-Spam-Status: No, score=-1.0 X-Spam-Checker-Version: spamc_ctasd client on localost X-Spam-Level: X-CTCH-PVer: 0000001 X-CTCH-Spam: Unknown X-CTCH-VOD: Unknown X-CTCH-Flags: 0 X-CTCH-RefID: str=0001.0A020201.54297904.004E,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-CTCH-Score: 0.000 X-CTCH-ScoreCust: 0.000 X-CTCH-Rules: X-CTCH-SenderID: sachin@datametica.com X-CTCH-SenderID-Flags: 0 X-CTCH-SenderID-TotalMessages: 1 X-CTCH-SenderID-TotalSpam: 0 X-CTCH-SenderID-TotalSuspected: 0 X-CTCH-SenderID-TotalConfirmed: 0 X-CTCH-SenderID-TotalBulk: 0 X-CTCH-SenderID-TotalVirus: 0 X-CTCH-SenderID-TotalRecipients: 0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - md-29.webhostbox.net X-AntiAbuse: Original Domain - hbase.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - datametica.com X-Get-Message-Sender-Via: md-29.webhostbox.net: mailgid no entry from get_relayhosts_entry X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=0.0 required=50.0 tests=SpamClass_Unknown, VirusClass_Unknown autolearn=disabled version=1.0.0 'hostname' command returns localhost.localdomain I am having a cloudera quick start vm so i am using that as my cluster so whatever cloudera provides i have it. And i am trying to access the hbase of cloudera vm remotely On Monday 29 September 2014 08:38 PM, Sean Busbey wrote: > What does the "hostname" command return on the master? > > Do you have any backup-masters configured? > > What is the contents of your regionservers file? > > On Mon, Sep 29, 2014 at 9:55 AM, SACHINGUPTA wrote: > >> yes >> >> On Monday 29 September 2014 08:18 PM, Sean Busbey wrote: >> >>> Does the IP you listed properly handle DNS resolution? You should make >>> sure >>> forward and reverse look up work properly for hosts used. >>> >>> Generally you should also configure things via host name and not IP >>> address. >>> >>> On Mon, Sep 29, 2014 at 8:17 AM, SACHINGUPTA >>> wrote: >>> >>> java client >>>> package com.example.hbaseconnect.HBaseConnect; >>>> >>>> import java.io.IOException; >>>> >>>> import org.apache.hadoop.conf.Configuration; >>>> import org.apache.hadoop.hbase.HBaseConfiguration; >>>> import org.apache.hadoop.hbase.client.HBaseAdmin; >>>> import org.apache.hadoop.hbase.client.HTable; >>>> import org.apache.hadoop.hbase.client.Scan; >>>> >>>> public class HBaseConnect { >>>> public static void main(String[] args) throws IOException { >>>> Configuration conf = HBaseConfiguration.create(); >>>> conf.clear(); >>>> conf.addResource("hbase-site.xml"); >>>> conf.set("hbase.zookeeper.quorum","10.255.1.61"); >>>> conf.set("hbase.zookeeper.property.clientPort","2181"); >>>> conf.set("hbase.master", "10.255.1.61:60010"); >>>> >>>> HBaseAdmin.checkHBaseAvailable(conf); >>>> System.out.println("connected to hbase"); >>>> HTable table = new HTable(conf, "bunty"); >>>> Scan scan = new Scan(); >>>> } >>>> } >>>> >>>> >>>> client side hbase-site.xml >>>> >>>> >>>> >>>> >>>> >>>> >>>> hbase.rootdir >>>> hdfs://10.255.1.61:8020/hbase >>>> >>>> >>>> hbase.client.write.buffer >>>> 2097152 >>>> >>>> >>>> hbase.client.pause >>>> 1000 >>>> >>>> >>>> hbase.client.retries.number >>>> 10 >>>> >>>> >>>> hbase.client.scanner.caching >>>> 1 >>>> >>>> >>>> hbase.client.keyvalue.maxsize >>>> 10485760 >>>> >>>> >>>> hbase.rpc.timeout >>>> 60000 >>>> >>>> >>>> hbase.security.authentication >>>> simple >>>> >>>> >>>> zookeeper.session.timeout >>>> 60000 >>>> >>>> >>>> zookeeper.znode.parent >>>> /hbase >>>> >>>> >>>> zookeeper.znode.rootserver >>>> root-region-server >>>> >>>> >>>> hbase.zookeeper.quorum >>>> 10.255.1.61 >>>> >>>> >>>> hbase.zookeeper.property.clientPort >>>> 2181 >>>> >>>> >>>> >>>> >>>> On Monday 29 September 2014 06:35 PM, Wellington Chevreuil wrote: >>>> >>>> Hi, >>>>> You should not do this, as localhost should resolve to the own host. >>>>> This >>>>> is probably some missing property on the clients hbase configuration >>>>> (make >>>>> sure you have a proper hbase-site.xml on client's classpath or set >>>>> configuration programatically). As a start, check if you had set the >>>>> properties below on your client's hbase config. >>>>> >>>>> >>>>> hbase.zookeeper.quorum >>>>> ZK_HOSTS >>>>> >>>>> >>>>> hbase.zookeeper.property.clientPort >>>>> 2181 >>>>> >>>>> >>>>> >>>>> On 29 Sep 2014, at 13:43, SACHINGUPTA wrote: >>>>> >>>>> Hello guys >>>>> >>>>>> I am using the hbase java api to connect to hbase remotely, but when I >>>>>> executed the java code, got |MasterNotRunningException|. When I >>>>>> debugged >>>>>> the code, I came to know that zookeeper was returning the address of >>>>>> hmaster as localhost.localdomain, so the client was trying to search >>>>>> for >>>>>> the hmaster locally. When I changed the |/etc/hosts| file of my local >>>>>> machine from where i am running the java client as: >>>>>> >>>>>> | localhost.localdomain| >>>>>> >>>>>> then it worked fine. >>>>>> >>>>>> However, I think that this is not the right way. I think I have to >>>>>> change the addresses somewhere in the configuration of zookeeper, but >>>>>> I did >>>>>> not get it. >>>>>> >>>>>> please help >>>>>> thanks >>>>>> >>>>>> >>>>>> -- >>>>>> Thanks >>>>>> Sachin Gupta >>>>>> >>>>>> >>>>>> -- >>>> Thanks >>>> Sachin Gupta >>>> >>>> >>>> >> -- >> Thanks >> Sachin Gupta >> >> > -- Thanks Sachin Gupta