我嘗試的過程如下
1. 時間沒有同步
用date命令看一下每個機器 如果時間差距大 說明確實有問題
** 配置時間服務器
** 檢查時區
$ date -R
** 檢查軟件包 NTP服務器【Network Time Protocol(NTP)】是用來使計算機時間同步化的一種協議
如果ntp工具不存在,則需要使用yum安裝
$ sudo
rpm -qa
| grep ntp
如果不存在則安裝:
$ sudo
yum -y install ntp
** 如果時區不是+0800東八區區時的話,需要手動糾正
$ sudo rm -rf /etc/localtime
$ sudo ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
** 先以網絡時間為標准,糾正集群的時間服務器的時間
$ sudo ntpdate pool.ntp.org
** 修改ntp配置文件(只修改主服務器的時間配置,其他的向主服務器同步時間即可)
$ sudo vi /etc/ntp.conf
修改為如下:
#允許192.168.216.x網段上的所有機器和當前這台機器進行實踐同步
restrict 192.168.216.0 mask 255.255.255.0 nomodify notrap

#當該節點丟失網絡連接,依然可以作為時間服務器為集群其他節點提供時間同步服務
server 127.127.1.0
fudge 127.127.1.0 stratum 10
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
** 重啟ntp服務
CentOS6:
$ sudo chkconfig ntpd on
$ sudo service ntpd restart
CentOS7:
$ sudo systemctl enable ntpd.service
$ sudo systemctl restart ntpd.service
** 使用從節點,手動同步時間(后面兩台機器都要操作)
$ sudo ntpdate linux01
** 設置時間同步任務
# crontab -e 編輯時間任務
(尖叫提示:上面的#號代表root用戶,下邊的#號代表shell注釋)
# .------------------------------------------minute(0~59)
# | .----------------------------------------hours(0~23)
# | | .--------------------------------------day of month(1~31)
# | | | .------------------------------------month(1~12)
# | | | | .----------------------------------day of week(0~6)
# | | | | | .--------------------------------command
# | | | | | |
# | | | | | |
*/10 * * * * /usr/sbin/ntpdate linux01
# crontab -l 查看時間任務
** 重啟定時任務
CentOS6:
# service crond restart
CentOS7:
# systemctl restart crond.service
2. 底層采用的不是hdfs協議
這個可以通過查看hbase-site.xml中參數hbase.rootdir的值來群定,一些其它的協議比如file協議等等,
HBase也 是支持的
<property> <name>hbase.rootdir</name> <value>hdfs://linux01:8020/hbase</value> </property>
3. 關閉防火牆
4, 我是上面三個都沒成功 ,
關閉 zookeeper ,hadoop集群 ,hbase;
格式化了namenode
然后重啟了 zookeeper ,重啟了hadoop集群 ,重啟了hbase;