HBase 异常记录 ERROR: org.apache.hadoop.hbase.MasterNotRunningException: Retried 7 times

时间:2022-04-02 08:27:07
13/12/28 21:00:58 INFO client.HConnectionManager$HConnectionImplementation: ZooKeeper available but no active master location found
13/12/28 21:00:58 INFO client.HConnectionManager$HConnectionImplementation: getMaster attempt 0 of 1 failed; no more retrying.
org.apache.hadoop.hbase.MasterNotRunningException
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:707)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:126)
at org.apache.hadoop.hbase.master.HMasterCommandLine.stopMaster(HMasterCommandLine.java:175)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:106)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2044)

13/12/28 21:00:58 INFO client.HConnectionManager$HConnectionImplementation: Closed zookeeper sessionid=0x1433c6c1c160025



13/12/28 21:19:19 INFO client.HConnectionManager$HConnectionImplementation: ZooKeeper available but no active master location found
13/12/28 21:19:19 INFO client.HConnectionManager$HConnectionImplementation: getMaster attempt 0 of 1 failed; no more retrying.
org.apache.hadoop.hbase.MasterNotRunningException
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:707)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:126)
at org.apache.hadoop.hbase.master.HMasterCommandLine.stopMaster(HMasterCommandLine.java:175)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:106)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2044)


1、查看hadoop是否是处于安全模式: hadoop dfsadmin -safemode get    结果是false 

2、那就是master没有启动,也启动不了导致的错误。

这是的启动不了hbase-site.xml

<configuration>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://hadoop:9000</value>
</property>

修改后 hbase-site.xml

<configuration>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://hadoop:9000/hbase</value>
</property>

重新启动hbase成功了。