hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 梁景明 <futur...@gmail.com>
Subject Re: Fail to connect a remote hbase server with java api
Date Sun, 25 Oct 2009 01:22:43 GMT
thank you very much ,i fix it , finally i found that the jars version in
remote server
is 0.20.1 ,and  in my web project is hbase 0.20.0 and i updated some jars in
web project
and tested ,and it works .
thanks again


2009/10/25 stack <stack@duboce.net>

> Just open all ports?  Start there and then shut them down after you have
> things working?
>
> So, accessing the hbase servers using a local client works but remotely,
> you
> can't get to the hbase cluster?
>
> If so, thats networking or in your web project context, you are not picking
> up the hbase-site.xml that points at the remote cluster.  Try setting the
> quorum into the HBaseConfiguration instance on start of your web app --
> conf.set("hbase.zookeeper.quorum", "ZK1, ZK2...");.
>
> St.Ack
>
>
> On Sat, Oct 24, 2009 at 6:02 AM, 梁景明 <futureha@gmail.com> wrote:
>
> > hi ,thanks,  follow it , i could get the result ,
> > keyvalues={1/id:/1256404800426/Put/vlen=1}
> >
> > i used it in my web project ,it fails ,but in local ubuntu testing
> > my web project goes well .
> >
> > what do u guess to deal with it .
> >
> > =================
> > > ./bin/hbase Test
> > >
> > > (Make sure Test.class is on the hbase CLASSPATH -- add path to
> Test.class
> > to
> > > hbase-env.sh under conf directory)
> > ==================
> >
> > 2009/10/24 Tatsuya Kawano <tatsuyaml@snowcocoa.info>
> >
> > > Hi,
> > >
> > > On Sat, Oct 24, 2009 at 6:37 PM, 梁景明 wrote:
> > > > HBase tree in ZooKeeper is rooted at /hbase
> > > >  Cluster up? true
> > > >  In safe mode? false
> > > >  Master address: 222.73.236.160:60000
> > > >  Region server holding ROOT: 222.73.236.160:60020
> > > >  Region servers:
> > > >    - 222.73.236.160:60020
> > >
> > > Thanks for the info. This just looks fine. And you also have opened
> > > port 60020, right?
> > >
> > >
> > > > org.apache.zookeeper.KeeperException$NodeExistsException:
> > KeeperErrorCode
> > > =
> > > > NodeExists
> > >
> > > This exception is becoming popular in HBase 0.20.1. Since it's
> > > harmless, you can safely ignore it.
> > >
> > >
> > >
> > > On Sat, Oct 24, 2009 at 7:06 PM, 梁景明 <futureha@gmail.com> wrote:
> > > > 2009-10-25 01:39:57,351 INFO org.apache.hadoop.ipc.HBaseServer: IPC
> > > Server
> > > > handler 8 on 60020, call null([B@1b67d6a) from 222.73.236.160:42277:
> > > error:
> > > > java.io.IOException: java.lang.NullPointerException
> > > > java.io.IOException: java.lang.NullPointerException
> > >
> > > OK. This is the same exception I saw in the client stack trace you
> > > attached in the first email. Your HBase 0.20.1 based program is
> > > failing on the following line ("server.getRegionInfo()") in
> > > HConnectionManager.java. It seems real exception occurs on the region
> > > server side (HBaseServer.java) but I don't know why (yet.)
> > >
> > > ===================================
> > >          HRegionInterface server =
> > getHRegionConnection(rootRegionAddress);
> > >          // if this works, then we're good, and we have an acceptable
> > > address,
> > >          // so we can stop doing retries and return the result.
> > >
> >  server.getRegionInfo(HRegionInfo.ROOT_REGIONINFO.getRegionName());
> > > ===================================
> > >
> > >
> > > Can you enable DEBUG logging on the server side, so we could see more
> > > details?
> > >
> > >
> > >
> > > > and i try a small java test in remote hbase server ,it also fails. if
> > it
> > > 's
> > > > the port problem ,
> > > > to connect by itself maybe not refused.
> > > >
> > > >        HBaseConfiguration conf = new HBaseConfiguration();
> > > >        HTable table = new HTable(conf, "blog".getBytes());
> > > >        Get g = new Get("1".getBytes());
> > > >        Result r = table.get(g);
> > > >        System.out.println(r);
> > >
> > > > but i dont understand ,why does hbase shell work well.
> > >
> > > Can you try the following stuff with your small java test, so that you
> > > can check if this is a classpath or config issue. Run it on the remote
> > > server where the HBase is running.
> > >
> > >
> > > On Tue, Oct 20, 2009 at 2:01 PM, stack wrote:
> > > > Try running your program like this:
> > > >
> > > > ./bin/hbase Test
> > > >
> > > > (Make sure Test.class is on the hbase CLASSPATH -- add path to
> > Test.class
> > > to
> > > > hbase-env.sh under conf directory)
> > > >
> > > > Doing above will ensure you get same CLASSPATH as your working shell.
> > > >
> > > > St.Ack
> > >
> > >
> > > Thanks,
> > >
> > > --
> > > Tatsuya Kawano (Mr.)
> > > Tokyo, Japan
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message