NotServingRegionException

Know how to troubleshoot issues related to the NotServingRegionException.

Condition

A region listed in hbase:meta is not assigned to any RegionServer. Any attempt to read from this region results in a NotServingRegionException.

The following is an error example:
org.apache.hadoop.hbase.NotServingRegionException: ... is not online on ...

As a result, the application cannot read data from the affected region.

Cause

Region is CLOSED or OFFLINE in hbase:meta, but not assigned.

Remedy

  1. Run the following command to troubleshoot the issue.
    echo "scan 'hbase:meta'" | hbase shell | grep <table> | grep <region-id>
  2. Run the following command to fix the issue.
    hbase hbck -j <hbck2-jar> assigns <region-id>