2013-08-22 62 views
1

我無法啓動Hbase,每當我啓動時,我只能以jps的形式獲取Hmaster和Hregionserver。 Hquorompeer保持missing.I檢查日誌,我收到以下錯誤:Hbase錯誤java.lang.RuntimeException:無法運行法定服務器

java.lang.RuntimeException: Unable to run quorum server 
     at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:454) 
     at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:409) 
     at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:151) 
     at org.apache.hadoop.hbase.zookeeper.HQuorumPeer.runZKServer(HQuorumPeer.java:80) 
     at org.apache.hadoop.hbase.zookeeper.HQuorumPeer.main(HQuorumPeer.java:70) 
Caused by: java.io.IOException: Failed to process transaction type: 1 error: KeeperErrorCode = NoNode for /hbase 
     at org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:153) 
     at org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:223) 
     at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:417) 
     ... 4 more 
Caused by: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /hbase 
     at org.apache.zookeeper.server.persistence.FileTxnSnapLog.processTransaction(FileTxnSnapLog.java:211) 
     at org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:151) 
+0

發佈你的配置文件的內容 – techvineet

+0

其中的所有文件hbase-site.xml? – user2567368

+0

轉到HBASE_HOME/conf/hbase-site.xml和hbase-default.xml – techvineet

回答

3

您遇到這個錯誤可能是在那裏動物園管理員商店快照和日誌被損壞的數據目錄的原因。

爲了避免HQuorumpeer守護進程消失,您需要提供一個路徑,以便zookeeper可以存儲其快照的新目錄。爲此,您需要在Hbase.site.xml中添加以下屬性

<property> 
<name>hbase.zookeeper.property.dataDir</name> 
<value>location of the newly created folder</value> 
<description>Property from ZooKeeper's config zoo.cfg. 
The directory where the snapshot is stored. 
</description> 
</property> 
+0

我從/ tmp目錄中刪除了所有日誌,這解決了我的問題。謝謝大家的時間。 – user2567368

+0

從zookeeper日誌目錄中刪除日誌有效。感謝user2567368 –

0

從ZooKeeper目錄中刪除所有文件解決了該問題。在我的情況

rm /var/lib/zookeeper/version-2/* 
1

的 「hbase.zookeeper.property.dataDir」 是的/ tmp/HBase的默認路徑 - * /動物園管理員(/ tmp目錄/ HBase的-的Hadoop /動物園管理員),刪除它,然後嘗試啓動飼養員再次