您的位置:首页 > 运维架构 > Apache

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

2014-03-16 00:40 483 查看

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

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

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<RETURN>' for list of supported commands. Type "exit<RETURN>" 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'}

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<RETURN>' for list of supported commands.
Type "exit<RETURN>" 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 plaincopyprint?

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..............................................

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 plaincopyprint?

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

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 NameValueDescription
HBase Version0.94.2, r1395367HBase version and revision
HBase CompiledSun Oct 7 19:11:01 UTC 2012, jenkinsWhen HBase version was compiled and by whom
Hadoop Version1.0.4, r1393290Hadoop version and revision
Hadoop CompiledWed Oct 3 05:13:58 UTC 2012, hortonfoWhen Hadoop version was compiled and by whom
HBase Root Directoryfile:/tmp/hbase-mango/hbaseLocation of HBase home directory
HBase Cluster ID2a63a79a-3ec9-48d1-b840-d7635c6fb304Unique identifier generated for each HBase cluster
Load average2.67Average number of regions per regionserver. Naive computation.
Zookeeper Quorumslave1:2181,master:2181,slave2:2181Addresses of all registered ZK servers. For more, see zk dump.
Coprocessors[]Coprocessors currently loaded loaded by the master
HMaster Start TimeTue Jan 15 16:17:44 CST 2013Date stamp of when this HMaster was started
HMaster Active TimeTue Jan 15 16:17:44 CST 2013Date stamp of when this HMaster became active
hbase.rootdir 参数写成了 hbase.root.dir

hbase-site.xml如下:

[html]
view plaincopyprint?

<configuration>
<property>
<name><span style="color: rgb(255, 0, 0);">hbase.root.dir</span></name>
<value>hdfs://master:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.master</name>
<value>hdfs://master:<span style="color: rgb(255, 0, 0);">6000</span></value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>master,slave1,slave2</value>
</property>

</configuration>

<configuration>
<property>
<name>hbase.root.dir</name>
<value>hdfs://master:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.master</name>
<value>hdfs://master:6000</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>master,slave1,slave2</value>
</property>

</configuration>


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

[plain]
view plaincopyprint?

mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$ ./start-hbase.sh
starting master, logging to /home/mango/hadoop-1.0.4/hbase-0.94.2/logs/hbase-mango-master-master.out
slave2: starting regionserver, logging to /home/mango/hadoop-1.0.4/hbase-0.94.2/bin/../logs/hbase-mango-regionserver-slave2.out
slave1: starting regionserver, logging to /home/mango/hadoop-1.0.4/hbase-0.94.2/bin/../logs/hbase-mango-regionserver-slave1.out
master: starting regionserver, logging to /home/mango/hadoop-1.0.4/hbase-0.94.2/bin/../logs/hbase-mango-regionserver-master.out
mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$ jps
3115 JobTracker
10210 Jps
3301 TaskTracker
2577 NameNode
2954 SecondaryNameNode
3521 QuorumPeerMain
9871 HMaster
2759 DataNode
10084 HRegionServer
mango@master:~/hadoop-1.0.4/hbase-0.94.2/bin$ hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" 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.6667 average load

hbase(main):002:0> create 't1','f1'
0 row(s) in 1.1950 seconds

hbase(main):003:0> create 't2','f2'
0 row(s) in 1.0620 seconds

hbase(main):004:0> put 't1','row1','f1:c1','value1'
0 row(s) in 0.1130 seconds

hbase(main):005:0> put 't1','row2','f1:c1','value1'
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐