You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Rural Hunter <ru...@gmail.com> on 2014/01/20 03:59:13 UTC
Long running client got NoServerForRegionException
Hi,
I'm using hbase 0.96.1 with hadoop2. I have a client running all the
time. It connects to hbase when it receives data from time to time. The
logic of this client is like this:
1. It keeps the HConnection got from
HConnectionManager.createConnection() when the client inits.
2. It calls getTable from the HConnection kept above to access hbase
tables from time to time.
There are serveral same clients running on several server. From one time
point, On only one of the server, the client started to experience the
NoServerForRegionException:
org.apache.hadoop.hbase.client.NoServerForRegionException: Unable to find region for after 3 tries.
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:1127)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:1047)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:1004)
at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:325)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:309)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getTable(HConnectionManager.java:706)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getTable(HConnectionManager.java:688)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getTable(HConnectionManager.java:678)
Note the table name and rowkey after 'Unable to find region for' is
empty. I checked the code in the client and it can never pass an empty
table name to getTable. I also checked the master and zookeeper log but
didn't find any error related to this. As far as I know, there could be
some intermittent network problem between the client and the hbase
server. What can be the cause for the error and how can I avoid/fix it?
Re: Long running client got NoServerForRegionException
Posted by Rural Hunter <ru...@gmail.com>.
This is the full stacktrace:
org.apache.hadoop.hbase.client.NoServerForRegionException: Unable to
find region for after 3 tries.
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:1127)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:1047)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:1004)
at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:325)
at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:309)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getTable(HConnectionManager.java:706)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getTable(HConnectionManager.java:688)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getTable(HConnectionManager.java:678)
at com.testapp.common.hadoop.HbaseClient.getHtable(HbaseClient.java:96)
at com.testapp.common.hadoop.HbaseClient.getSource(HbaseClient.java:129)
at
com.testapp.monitor.util.CommonOperations.getCurrentSource(CommonOperations.java:59)
δΊ 2014/1/20 11:15, Ted Yu ει:
> Looks like the table name is not in the log statement:
>
> throw new NoServerForRegionException("Unable to find region for "
>
> + Bytes.toStringBinary(row) + " after " + numTries + " tries.");
>
> We should add tableName to the above log.
>
> >From HTable:
>
> private void finishSetup() throws IOException {
>
> this.connection.locateRegion(tableName, HConstants.EMPTY_START_ROW);
>
> It seems tableName couldn't be retrieved from hbase.meta
>
>
> Can you show the complete stack trace ?
Re: Long running client got NoServerForRegionException
Posted by Ted Yu <yu...@gmail.com>.
Looks like the table name is not in the log statement:
throw new NoServerForRegionException("Unable to find region for "
+ Bytes.toStringBinary(row) + " after " + numTries + " tries.");
We should add tableName to the above log.
>From HTable:
private void finishSetup() throws IOException {
this.connection.locateRegion(tableName, HConstants.EMPTY_START_ROW);
It seems tableName couldn't be retrieved from hbase.meta
Can you show the complete stack trace ?
On Sun, Jan 19, 2014 at 6:59 PM, Rural Hunter <ru...@gmail.com> wrote:
> Hi,
>
> I'm using hbase 0.96.1 with hadoop2. I have a client running all the time.
> It connects to hbase when it receives data from time to time. The logic of
> this client is like this:
> 1. It keeps the HConnection got from HConnectionManager.createConnection()
> when the client inits.
> 2. It calls getTable from the HConnection kept above to access hbase
> tables from time to time.
>
> There are serveral same clients running on several server. From one time
> point, On only one of the server, the client started to experience the
> NoServerForRegionException:
> org.apache.hadoop.hbase.client.NoServerForRegionException: Unable to find
> region for after 3 tries.
> at org.apache.hadoop.hbase.client.HConnectionManager$
> HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:1127)
> at org.apache.hadoop.hbase.client.HConnectionManager$
> HConnectionImplementation.locateRegion(HConnectionManager.java:1047)
> at org.apache.hadoop.hbase.client.HConnectionManager$
> HConnectionImplementation.locateRegion(HConnectionManager.java:1004)
> at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:325)
> at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:309)
> at org.apache.hadoop.hbase.client.HConnectionManager$
> HConnectionImplementation.getTable(HConnectionManager.java:706)
> at org.apache.hadoop.hbase.client.HConnectionManager$
> HConnectionImplementation.getTable(HConnectionManager.java:688)
> at org.apache.hadoop.hbase.client.HConnectionManager$
> HConnectionImplementation.getTable(HConnectionManager.java:678)
>
> Note the table name and rowkey after 'Unable to find region for' is empty.
> I checked the code in the client and it can never pass an empty table name
> to getTable. I also checked the master and zookeeper log but didn't find
> any error related to this. As far as I know, there could be some
> intermittent network problem between the client and the hbase server. What
> can be the cause for the error and how can I avoid/fix it?
>