ERROR:org.apache.hadoop.hbase.PleaseHoldException: Master is initializing 解决方案

我尝试的过程如下

 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;

 

posted on 2018-08-21 11:23  一只猪儿虫  阅读(15733)  评论(0编辑  收藏  举报