HBASE 创建表出错:ERROR: : Table Namespace Manager not ready yet, try again later

时间:2025-04-12 07:55:12

当需要创建表的时候出现如下报错:


hbase(main):002:0> create 'test', {NAME=>'f1'}

ERROR: : Table Namespace Manager not ready yet, try again later
    at (:3172)
    at (:1727)
    at (:1766)
    at $MasterService$2.callBlockingMethod(:40470)
    at (:2027)
    at (:108)
    at $1.run(:74)
    at $(:471)
    at (:262)
    at (:1145)
    at $(:615)
    at (:745)

Here is some help for this command:
Creates a table. Pass a table name, and a set of column family
specifications (at least one), and, optionally, table configuration.
Column specification can be a simple string (name), or a dictionary
(dictionaries are described below in main help output), necessarily 
including NAME attribute. 
Examples:
序号 出错原因 解决方案
1 没有关闭安全模式 在hadoop目录输入bin/hadoop dfsadmin -safemode leave
2 把单机配置到多机 当不使用hbase自带的zookeeper时,需要修改conf/ 注释掉export HBASE_MANAGES_ZK=true 。重新启动hbase就可以了
3 没有时间同步 使用ntp工具同步, 1:crontab -e 输入0 1 * * * /usr/sbin/ntpdate master,2: 手动同步终端输入:ntpdate
4 zookeeper引起的,通常这种情况往往是在你正在运行一个进程正在操作hbase数据库的时候,hbase进程被杀掉或hbase服务被停掉所引起的 可以将hbase的zookeeper目录下的文件全都删除掉,然后再重启hbase服务就可以了
5 数据损坏导致当前数据存放的regin无法使用 此时使用hadoop fsck 进行分析 就能看到CORRUPT 的storefile路径 hadoop fs -rm 当前storefile

后面两条是网上找的,以后会用到的。