hbase 解决bug 小记

今天启动hbase 集群, 查看表时 报错 
hbase(main):001:0> list
TABLE                                                                                                                                

ERROR: org.apache.hadoop.hbase.ipc.ServerNotRunningYetException: Server is not running yet
at org.apache.hadoop.hbase.ipc.RpcServer$Handler.run(RpcServer.java:1841)

Here is some help for this command:
List all tables in hbase. Optional regular expression parameter could
be used to filter the output. Examples:

  hbase> list
  hbase> list 'abc.*'
所以去查看 日志
more hbase-root-master-hadoop1.log
这里面日志比较多,如果你想查看当天的日志
可以使用 /2015-05-23(当天时间)
2015-05-23 17:00:17,542 INFO  [master:hadoop1:60000] catalog.CatalogTracker: Failed verification of hbase:meta,,1 at address=hadoop3,60020,1431732531994, exception=org.apache.hadoop.hbase.NotServingRegionException: org.apache.hadoop.hbase.NotServingRegionException: Region is not online: 1588230740
        at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:2576)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:3949)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionInfo(HRegionServer.java:3366)
        at org.apache.hadoop.hbase.protobuf.generated.AdminProtos$AdminService$2.callBlockingMethod(AdminProtos.java:19789)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2146)
        at org.apache.hadoop.hbase.ipc.RpcServer$Handler.run(RpcServer.java:1851)

经查看原因原来是 hadoop  集群在安全模式的原因
执行命令
hadoop dfsadmin -safemode leave
再重新启动habase

[root@hadoop1 logs]# hbase shell
2015-05-23 17:14:45,609 INFO  [main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.96.0-hadoop2, r1531434, Fri Oct 11 15:28:08 PDT 2013

hbase(main):001:0> list
TABLE
gmail
test
2 row(s) in 4.1420 seconds

=> ["gmail", "test"]
问题解决
-safemode enter|leave|get|wait安全模式维护命令。安全模式是Namenode的一个状态,这种状态下
1.不接受对名字空间的更改(只读)
2.不复制或删除块
Namenode会在启动时自动进入安全模式,当配置的块最小百分比数满足最小的副本数条件时,会自动离开安全模式。安全模式可以手动进入,但是这样的话也必须手动关闭安全模式。

猜你喜欢

转载自liliang68.iteye.com/blog/2213802