分享

Hbase 报错:ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is ini...

Wyy_Ck 发表于 2016-11-11 16:40:38 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 5 24823
版本: hadoop 2.7.0

[mw_shl_code=bash,true][hadoop@master bin]$ jps
37168 HMaster
36387 ResourceManager
37637 Jps
37048 HQuorumPeer
36201 SecondaryNameNode
37485 Main
35949 NameNode
[/mw_shl_code]


[mw_shl_code=bash,true][hadoop@slave1 data]$ jps
2096 HRegionServer
20833 DataNode
1940 HQuorumPeer
2346 Jps
20970 NodeManager[/mw_shl_code]


在Master执行Hbase  shell 进入之后,执行简单的status 或者 List 命令报错如下:

[mw_shl_code=bash,true]hbase(main):001:0> status

ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
        at org.apache.hadoop.hbase.master.HMaster.checkInitialized(HMaster.java:2293)
        at org.apache.hadoop.hbase.master.MasterRpcServices.getClusterStatus(MasterRpcServices.java:777)
        at org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java:55652)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2178)
        at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:112)
        at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:133)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:108)
        at java.lang.Thread.run(Thread.java:745)

Here is some help for this command:
Show cluster status. Can be 'summary', 'simple', 'detailed', or 'replication'. The
default is 'summary'. Examples:

  hbase> status
  hbase> status 'simple'
  hbase> status 'summary'
  hbase> status 'detailed'
  hbase> status 'replication'
  hbase> status 'replication', 'source'
  hbase> status 'replication', 'sink'[/mw_shl_code]


各位同仁 有没有遇到过类似问题的?感谢

已有(5)人评论

跳转到指定楼层
Wyy_Ck 发表于 2016-11-11 16:49:14
只是重新进入了一次hbase  shell  其他什么也没做 报错变了
[mw_shl_code=bash,true]hbase(main):001:0> list
TABLE                                                                                                                                                                                          

ERROR: Can't get master address from ZooKeeper; znode data == null

Here is some help for this command:
List all tables in hbase. Optional regular expression parameter could
be used to filter the output. Examples:

  hbase> list
  hbase> list 'abc.*'
  hbase> list 'ns:abc.*'
  hbase> list 'ns:.*'
[/mw_shl_code]
回复

使用道具 举报

arsenduan 发表于 2016-11-11 17:51:28
常见错误,原因很多比如配置文件错误

hbase-site.xml中
hbase.rootdir 参数误写成了 hbase.root.dir

防火墙没有关闭,或则端口无法访问

还有
/etc/hosts文件中的127.0.0.1是不是写成了127.0.1.1


回复

使用道具 举报

arsenduan 发表于 2016-11-11 17:57:08
对于这个错误
ERROR: Can't get master address from ZooKeeper; znode data == null

原因:
运行hbase(zookeeper)的用户无法写入zookeeper文件,导致znode data为空。


在hbase-site.xml指定一个运行hbase的用户有写入文件权限的目录作为zookeeper数据目录,如
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/home/user88/zk_data</value>
  </property>

(2)hbase-site.xml文件中的

<property>  
<name>hbase.rootdir</name>   
<value>hdfs://hadoop1:49002/hbase</value>  
</property>

与core-site.xml中fs.defaultFS中的路径不相同

<property>
      <name>fs.defaultFS</name>
      <value>hdfs://hadoop1:9000</value>
  </property>


第二种解决办法
出现ERROR: Can't get master address from ZooKeeper; znode data == null解决办法
http://www.aboutyun.com/forum.php?mod=viewthread&tid=8691

如果以上都不能解决比尝试下面办法:




删除datanode节点中的临时文件
重新格式化namenode
重启hadoop
重启hbase





回复

使用道具 举报

QIDOUDOU 发表于 2016-11-14 09:30:56
arsenduan 发表于 2016-11-11 17:57
对于这个错误
ERROR: Can't get master address from ZooKeeper; znode data == null

大神啊
回复

使用道具 举报

Wyy_Ck 发表于 2016-11-14 17:26:25
arsenduan 发表于 2016-11-11 17:51
常见错误,原因很多比如配置文件错误

hbase-site.xml中

确实是修改了root.dir 就好了 谢谢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条