After hbase is restarted, an error is reported when you go to hbase shell to perform scan, get, create, and other operations:
Error: org. Apache. hadoop. hbase. notservingregionexception: org. Apache. hadoop. hbase. notservingregionexception: Region is not online:. Meta., 1
At org. Apache. hadoop. hbase. regionserver. hregionserver. getregion (hregionserver. Java: 3154)
At org. Apache. hadoop. hbase. regionserver. hregionserver. getclosestrowbefore (hregionserver. Java: 1974)
At sun. Reflect. generatedmethodaccessor11.invoke (unknown source)
At sun. Reflect. delegatingmethodaccessorimpl. Invoke (delegatingmethodaccessorimpl. Java: 25)
At java. Lang. Reflect. method. Invoke (method. Java: 597)
At org. Apache. hadoop. hbase. IPC. writablerpcengine $ server. Call (writablerpcengine. Java: 364)
At org. Apache. hadoop. hbase. IPC. hbaseserver $ handler. Run (hbaseserver. Java: 1400
It took a long time to find out that the regionserver failed to start because of inconsistent time between nodes in the cluster: The time error threshold between the cluster nodes and the master node is determined by hbase. master. set the maxclockskew parameter.
1. solution 1: Increase the parameter value to 5 minutes
Add configuration in hbase-site.xml
<Property>
<Name> hbase. master. maxclockskew </Name>
<Value> <span style = "color: # ff0000;"> 300000 </span> </value>
<Description> time difference of regionserver from Master </description>
</Property>
2. solution 2
Modify the time of each node so that the error is within 30 s.
Linux modification time:
[Hbase] error: Region is not online