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

    

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

转自:http://blog.csdn.net/mango_song/article/details/8505535

 
  1. mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$ 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. mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$ hbase shell  
  13. HBase Shell; enter 'help' for list of supported commands.  
  14. Type "exit" to leave the HBase Shell  
  15. Version 0.94.2, r1395367, Sun Oct  7 19:11:01 UTC 2012  
  16.   
  17. hbase(main):001:0> status  
  18. 3 servers, 0 dead, 0.0000 average load  
  19.   
  20. hbase(main):002:0> create 't1','f1'  
  21.   
  22. ERROR: org.apache.hadoop.hbase.PleaseHoldException: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing  
  23.   
  24. Here is some help for this command:  
  25. Create table; pass table name, a dictionary of specifications per  
  26. column family, and optionally a dictionary of table configuration.  
  27. Dictionaries are described below in the GENERAL NOTES section.  
  28. Examples:  
  29.   
  30.   hbase> create 't1', {NAME => 'f1', VERSIONS => 5}  
  31.   hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}  
  32.   hbase> # The above in shorthand would be the following:  
  33.   hbase> create 't1', 'f1', 'f2', 'f3'  
  34.   hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}  
  35.   hbase> create 't1', 'f1', {SPLITS => ['10', '20', '30', '40']}  
  36.   hbase> create 't1', 'f1', {SPLITS_FILE => 'splits.txt'}  
  37.   hbase> # Optionally pre-split the table into NUMREGIONS, using  
  38.   hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)  
  39.   hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}  
mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$ jps
31789 HMaster
17931 JobTracker
17450 NameNode
18112 TaskTracker
32025 HRegionServer
32216 Jps
17833 SecondaryNameNode
30639 Main
27183 QuorumPeerMain
17631 DataNode
mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$ hbase shell
HBase Shell; enter 'help' for list of supported commands.
Type "exit" to leave the HBase Shell
Version 0.94.2, r1395367, Sun Oct  7 19:11:01 UTC 2012

hbase(main):001:0> status
3 servers, 0 dead, 0.0000 average load

hbase(main):002:0> create 't1','f1'

ERROR: org.apache.hadoop.hbase.PleaseHoldException: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing

Here is some help for this command:
Create table; pass table name, a dictionary of specifications per
column family, and optionally a dictionary of table configuration.
Dictionaries are described below in the GENERAL NOTES section.
Examples:

  hbase> create 't1', {NAME => 'f1', VERSIONS => 5}
  hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}
  hbase> # The above in shorthand would be the following:
  hbase> create 't1', 'f1', 'f2', 'f3'
  hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}
  hbase> create 't1', 'f1', {SPLITS => ['10', '20', '30', '40']}
  hbase> create 't1', 'f1', {SPLITS_FILE => 'splits.txt'}
  hbase> # Optionally pre-split the table into NUMREGIONS, using
  hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
  hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}

执行stop-hbase.sh 处于无限等待状态

[plain] view plain copy print ?
  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..............................................  
mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$ ./st
start-hbase.sh  stop-hbase.sh   
mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$ ./stop-hbase.sh 
stopping hbase..............................................

查看日志

[plain] view plain copy print ?
  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  
2013-01-15 15:37:45,377 INFO org.apache.hadoop.ipc.HBaseServer: Starting IPC Server listener on 60000
2013-01-15 15:37:45,420 INFO org.apache.hadoop.hbase.ipc.HBaseRpcMetrics: Initializing RPC Metrics with hostName=HMaster, port=60000
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
2013-01-15 15:37:46,075 INFO org.apache.zookeeper.ZooKeeper: Client environment:host.name=master
2013-01-15 15:37:46,075 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.version=1.6.0_13
2013-01-15 15:37:46,075 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.vendor=Sun Microsystems Inc.
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如下:

[html] view plain copy print ?
  1. <configuration>  
  2.         <property>  
  3.                 <name><span style="color: rgb(255, 0, 0);">hbase.root.dirspan>name>  
  4.                 <value>hdfs://master:9000/hbasevalue>  
  5.         property>  
  6.         <property>  
  7.                 <name>hbase.cluster.distributedname>  
  8.                 <value>truevalue>  
  9.         property>  
  10.         <property>  
  11.                 <name>hbase.mastername>  
  12.                 <value>hdfs://master:<span style="color: rgb(255, 0, 0);">6000span>value>  
  13.         property>  
  14.         <property>  
  15.                 <name>hbase.zookeeper.quorumname>  
  16.                 <value>master,slave1,slave2value>  
  17.         property>  
  18.   
  19. configuration>  

        
                hbase.root.dir
                hdfs://master:9000/hbase
        
        
                hbase.cluster.distributed
                true
        
        
                hbase.master
                hdfs://master:6000
        
        
                hbase.zookeeper.quorum
                master,slave1,slave2
        


修改hbase-site.xml后,重启集群,一切恢复正常。

[plain] view plain copy print ?
  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' for list of supported commands.  
  18. Type "exit" to leave the HBase Shell  
  19. Version 0.94.2, r1395367, Sun Oct  7 19:11:01 UTC 2012  
  20.   
  21. hbase(main):001:0> status  
  22. 3 servers, 0 dead, 0.6667 average load  
  23.   
  24. hbase(main):002:0> create 't1','f1'  
  25. 0 row(s) in 1.1950 seconds  
  26.   
  27. hbase(main):003:0> create 't2','f2'  
  28. 0 row(s) in 1.0620 seconds  
  29.   
  30. hbase(main):004:0> put 't1','row1','f1:c1','value1'  
  31. 0 row(s) in 0.1130 seconds  
  32.   
  33. hbase(main):005:0> put 't1','row2','f1:c1','value1'  

你可能感兴趣的:(hadoop)