hbase在create 'user','info'时出现error

在使用HBASE,create 'user','info'时出现:

ERROR [main]client.ConnectionManager$HConnectionImplementation: The node /hbase is not inZooKeeper. It should have been written by the master. Check the valueconfigured in 'zookeeper.znode.parent'. There could be a mismatch with the oneconfigured in the master

根据提示,缺少zookeeper.znode.parent的配置,在hbase-site.xml中增加配置,

    <property>  
      
        <name>zookeeper.znode.parent</name>  
          
        <value>/hbase-unsecure</value>  
          

    </property> 

参见:https://blog.csdn.net/mmm333zzz/article/details/51760298

这里不明白参数的意义,继续查找,发现:

  <property>  
    <name>zookeeper.znode.parent</name>  
    <value>/hbase</value>  
    <description>Root ZNode for HBase in ZooKeeper. All of HBase's ZooKeeper  
      files that are configured with a relative path will go under this node.  
      By default, all of HBase's ZooKeeper file path are configured with a  
      relative path, so they will all go under this directory unless changed.  

    </description>  

(参见:https://blog.csdn.net/macyang/article/details/6211141)

经过一番折腾,还是存在着问题,肯定是配置的问题呀,于是继续找跟我集群环境相似的配置,找到了如下介绍:

https://blog.csdn.net/peace1213/article/details/51336369

发现HBASE中的配置文件hbase-env.sh存在问题;

export HBASE_CLASSPATH=/usr/local/hadoop/conf
export HBASE_MANAGES_ZK=false

这两项之前没有配置,其中,HBASE_CLASSPATH指向存放有Hadoop配置文件的目录,这样HBase可以找到HDFS的配置信息,由于本文Hadoop和HBase部署在相同的物理节点,所以就指向了Hadoop安装路径下的conf目录。HBASE_MANAGES_ZK=false指示HBase使用已有的Zookeeper而不是自带的。

将配置文件拷贝覆盖原有节点,重新启动HBASE:

start-hbase.sh

查看jps进程,发现主节点和从节点出现HMaster和HregionServer,

继续执行:hbase shell

出现hbase>

创建:create 'user','info'----------------这次出现错误:ERROR :Master is initializing;

同步时间后,重新执行该步骤,出现ERROR:znode data =null;

再次执行,又出现ERROR :Master is initializing

与如下链接中的问题相同:https://blog.csdn.net/liulang12580/article/details/77841699)

查看hbase 的log,发现:

org.apache.hadoop.hbase.ClockOutOfSyncException: Server node4,60020,1405560498057 has been rejected; Reported time is too far out of sync with master.  Time difference of 28804194ms > max allowed of 30000ms

查看node4 的时间,发现是竟然和集群其他机器差了整整一天。(内网电脑还未配置好ntpdate,报错this exceeds the compiled library version)

手动调整时间,重新启动hbase,

查看node4的进程,出现了HRegionServer

执行 create 'user','info'

成功。




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值