我尝试的过程如下
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
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbsAAAA1CAYAAADYpEUCAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAABVeSURBVHhe7Z3tdeO4DoanJ7fjYtyLa3EpU8L9nYsXJEgQBEhRcbyxh7vnOROLIgHiU7Ll5M8X/ff379+v//3vfwx+/vPnz2az2Ww2n8NudpvNZrP5eHaz22w2m83Hs5vdZrPZbD6e3ex+jsvtwfZkHrevi3POM3m1vJdzuX093mBfH++Hb3P5uj3+ft2v3tgPcr1vf/zL/HizQ4Ddr/NjJ0BRedwu7tiv4tVJ9mJ5L/PDmzS7wocX11fn37flfbg/NhOWm50qONf74+t2cc7ReI3NO3aC3ewCXixvN7uADy+uu9lt3orlZkcBkwLu+nX/e/+6eudoEGCjZkcF7P5Ib/k87m0gXm4ki45j7O/jXhsr5svxQtUlnDcj0iUX2Rs19yTrQJPXREk22Du/1aPk3a81ya/3NIfx1o3kRUz3Z3SRghP6AW9TeTZCzOTjs73T/HvjRzon65nOTW+FHS1+Y5sF8mTM2/sRQj/Ea45i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c39DTKzgNrsR+OrC73hA5dX181ez3OxU4cB3NY4F+Hle7azvyOvnpu/rlIS+7D//89Px4nK22Q19BPtF+xmNDfh0ecSviYkVVpsd4m03u9/HcrMjxyfj2auXlADen5PgMX01p4xvryxL4CPA5HjhmDxO2nysL+ZGFyn+U3lzusBC0NskKfZTx5j1q8E+kEdr9GOribB2/gl5bC86B3cNiIXsJz0nPe2WMbYNY6nxA+Jm9Q5V0HtK8ffsZtDyafJOxmD2n87bRjaNd1+6PhBL7jw1lmKJasT+8z9Fltblvb5w/ufr/xi4qYuf+We2AAAAAElFTkSuQmCC" alt="" />
#当该节点丢失网络连接,依然可以作为时间服务器为集群其他节点提供时间同步服务
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;