Hbase创建表出错

1. 问题描述

1
2
3
4
5
6
hbase(main):002:0> create 'test','cf'

ERROR: java.io.IOException: Table Namespace Manager not ready yet, try again later
at org.apache.hadoop.hbase.master.HMaster.getNamespaceDescriptor(HMaster.java:3172)
at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1727)
at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1766)

2. 错误的原因

Hbase底层hadoop集群时间不一致

3. 解决方法

3.1 安装ntpdate工具

1
yum -y install ntp ntpdate

3.2 设置系统时间与网络时间同步

1
ntpdate cn.pool.ntp.org

4. 常用NTP服务器地址

4.1 阿里云授时服务器

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#NTP服务器
ntp.aliyun.com
ntp1.aliyun.com
ntp2.aliyun.com
ntp3.aliyun.com
ntp4.aliyun.com
ntp5.aliyun.com
ntp6.aliyun.com
ntp7.aliyun.com

#Time服务器
time1.aliyun.com
time2.aliyun.com
time3.aliyun.com
time4.aliyun.com
time5.aliyun.com
time6.aliyun.com
time7.aliyun.com

4.2 国内大学授时服务器

1
2
3
4
5
6
s1c.time.edu.cn       北京大学 
s2m.time.edu.cn 北京大学
s1b.time.edu.cn 清华大学
s1e.time.edu.cn 清华大学
s2a.time.edu.cn 清华大学
s2b.time.edu.cn 清华大学

4.3 国外授时服务器

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#苹果提供的授时服务器   
time1.apple.com
time2.apple.com
time3.apple.com
time4.apple.com
time5.apple.com
time6.apple.com
time7.apple.com

#Google提供的授时服务器
time1.google.com
time2.google.com
time3.google.com
time4.google.com