hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tatsuya Kawano <tatsuy...@snowcocoa.info>
Subject Re: Fail to connect a remote hbase server with java api
Date Sat, 24 Oct 2009 10:59:31 GMT

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:
>  Region server holding ROOT:
>  Region servers:
>    -

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 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.

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


Tatsuya Kawano (Mr.)
Tokyo, Japan

View raw message