分享

[HBase] ERROR:org.apache.hadoop.hbase.PleaseHoldException: Master is initiali...

nettman 2013-11-29 15:40:04 发表于 总结型 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 3 33225
今天重装HBase,通过hbase shell 创建table时抛出异常
  1. <P> <A href="mailto:mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$">mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$</A> jps
  2. 31789 HMaster
  3. 17931 JobTracker
  4. 17450 NameNode
  5. 18112 TaskTracker
  6. 32025 HRegionServer
  7. 32216 Jps
  8. 17833 SecondaryNameNode
  9. 30639 Main
  10. 27183 QuorumPeerMain
  11. 17631 DataNode
  12. <A href="mailto:mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$">mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$</A> hbase shell
  13. HBase Shell; enter 'help<RETURN>' for list of supported commands.
  14. Type "exit<RETURN>" to leave the HBase Shell
  15. Version 0.94.2, r1395367, Sun Oct  7 19:11:01 UTC 2012</P>
  16. <P>hbase(main):001:0> status
  17. 3 servers, 0 dead, 0.0000 average load</P>
  18. <P>hbase(main):002:0> create 't1','f1'</P>
  19. <P>ERROR: org.apache.hadoop.hbase.PleaseHoldException: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing</P>
  20. <P>Here is some help for this command:
  21. Create table; pass table name, a dictionary of specifications per
  22. column family, and optionally a dictionary of table configuration.
  23. Dictionaries are described below in the GENERAL NOTES section.
  24. Examples:</P>
  25. <P>  hbase> create 't1', {NAME => 'f1', VERSIONS => 5}
  26.   hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}
  27.   hbase> # The above in shorthand would be the following:
  28.   hbase> create 't1', 'f1', 'f2', 'f3'
  29.   hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}
  30.   hbase> create 't1', 'f1', {SPLITS => ['10', '20', '30', '40']}
  31.   hbase> create 't1', 'f1', {SPLITS_FILE => 'splits.txt'}
  32.   hbase> # Optionally pre-split the table into NUMREGIONS, using
  33.   hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
  34.   hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}</P>
复制代码
执行stop-hbase.sh 处于无限等待状态
  1. mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$ ./st
  2. start-hbase.sh stop-hbase.sh
  3. mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$ ./stop-hbase.sh
  4. stopping hbase..............................................
复制代码
查看日志
  1. 2013-01-15 15:37:45,377 INFO org.apache.hadoop.ipc.HBaseServer: Starting IPC Server listener on 60000
  2. 2013-01-15 15:37:45,420 INFO org.apache.hadoop.hbase.ipc.HBaseRpcMetrics: Initializing RPC Metrics with hostName=HMaster, port=60000
  3. 2013-01-15 15:37:46,074 INFO org.apache.zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.3-1240972, built on 02/06/2012 10:48 GMT
  4. 2013-01-15 15:37:46,075 INFO org.apache.zookeeper.ZooKeeper: Client environment:host.name=master
  5. 2013-01-15 15:37:46,075 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.version=1.6.0_13
  6. 2013-01-15 15:37:46,075 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.vendor=Sun Microsystems Inc.
  7. 2013-01-15 15:37:46,075 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.home=/home/mango/jdk1.6.0_13/jre
复制代码
查看 master:60010 发现hbase.rootdir 没有使用HDFS,典型的配置错误啊~~
Attributes
Attribute Name
Value
Description
HBase Version
0.94.2, r1395367
HBase version and revision
HBase Compiled
Sun Oct 7 19:11:01 UTC 2012, jenkins
When HBase version was compiled and by whom
Hadoop Version
1.0.4, r1393290
Hadoop version and revision
Hadoop Compiled
Wed Oct 3 05:13:58 UTC 2012, hortonfo
When Hadoop version was compiled and by whom
HBase Root Directory
file:/tmp/hbase-mango/hbase
Location of HBase home directory
HBase Cluster ID
2a63a79a-3ec9-48d1-b840-d7635c6fb304
Unique identifier generated for each HBase cluster
Load average
2.67
Average number of regions per regionserver. Naive computation.
Zookeeper Quorum
slave1:2181,master:2181,slave2:2181
Addresses of all registered ZK servers. For more, see zk dump.
Coprocessors
[]
Coprocessors currently loaded loaded by the master
HMaster Start Time
Tue Jan 15 16:17:44 CST 2013
Date stamp of when this HMaster was started
HMaster Active Time
Tue Jan 15 16:17:44 CST 2013
Date stamp of when this HMaster became active



hbase.rootdir 参数写成了 hbase.root.dir

hbase-site.xml如下:
  1. <configuration>
  2. <property>
  3. <name><SPAN style="COLOR: #ff0000">hbase.root.dir</SPAN></name>
  4. <value>hdfs://master:9000/hbase</value>
  5. </property>
  6. <property>
  7. <name>hbase.cluster.distributed</name>
  8. <value>true</value>
  9. </property>
  10. <property>
  11. <name>hbase.master</name>
  12. <value>hdfs://master:<SPAN style="COLOR: #ff0000">6000</SPAN></value>
  13. </property>
  14. <property>
  15. <name>hbase.zookeeper.quorum</name>
  16. <value>master,slave1,slave2</value>
  17. </property>
  18. </configuration>
复制代码
修改hbase-site.xml后,重启集群,一切恢复正常。
  1. mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$ ./start-hbase.sh
  2. starting master, logging to /home/mango/hadoop-1.0.4/hbase-0.94.2/logs/hbase-mango-master-master.out
  3. slave2: starting regionserver, logging to /home/mango/hadoop-1.0.4/hbase-0.94.2/bin/../logs/hbase-mango-regionserver-slave2.out
  4. slave1: starting regionserver, logging to /home/mango/hadoop-1.0.4/hbase-0.94.2/bin/../logs/hbase-mango-regionserver-slave1.out
  5. master: starting regionserver, logging to /home/mango/hadoop-1.0.4/hbase-0.94.2/bin/../logs/hbase-mango-regionserver-master.out
  6. mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$ jps
  7. 3115 JobTracker
  8. 10210 Jps
  9. 3301 TaskTracker
  10. 2577 NameNode
  11. 2954 SecondaryNameNode
  12. 3521 QuorumPeerMain
  13. 9871 HMaster
  14. 2759 DataNode
  15. 10084 HRegionServer
  16. mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$ hbase shell
  17. HBase Shell; enter 'help<RETURN>' for list of supported commands.
  18. Type "exit<RETURN>" to leave the HBase Shell
  19. Version 0.94.2, r1395367, Sun Oct 7 19:11:01 UTC 2012
  20. hbase(main):001:0> status
  21. 3 servers, 0 dead, 0.6667 average load
  22. hbase(main):002:0> create 't1','f1'
  23. 0 row(s) in 1.1950 seconds
  24. hbase(main):003:0> create 't2','f2'
  25. 0 row(s) in 1.0620 seconds
  26. hbase(main):004:0> put 't1','row1','f1:c1','value1'
  27. 0 row(s) in 0.1130 seconds
  28. hbase(main):005:0> put 't1','row2','f1:c1','value1'
复制代码
加微信w3aboutyun,可拉入技术爱好者群

已有(3)人评论

跳转到指定楼层
finder 发表于 2013-11-29 16:53:37
hbase.rootdir配置正确  但是还是不能创建表  查看status  显示 0 servers 这是什么回事啊?
回复

使用道具 举报

pig2 发表于 2013-11-29 17:03:21
finder 发表于 2013-11-29 16:53
hbase.rootdir配置正确  但是还是不能创建表  查看status  显示 0 servers 这是什么回事啊?

是不是你的启动顺序问题。你先停止集群,然后按照顺序启动他们
http://www.aboutyun.com/thread-5581-1-1.html
回复

使用道具 举报

Wyy_Ck 发表于 2016-12-20 10:59:01
配置一样的。 在执行status命令的时候, hbase master报错: No Route to host. 啥情况
回复

使用道具 举报

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

本版积分规则

关闭

推荐上一条 /2 下一条