2013-07-14 40 views
3

我試圖啓動HBase的主,但得到下面的錯誤:HBase的主人無法啓動

Could not start ZK at requested port of 2181. ZK was started at port: 2182. Aborting as clients (e.g. shell) will not be able to find this ZK quorum. 
13/07/14 06:33:23 ERROR master.HMasterCommandLine: Failed to start master 
java.io.IOException: Could not start ZK at requested port of 2181. ZK was started at port: 2182. Aborting as clients (e.g. shell) will not be able to find this ZK quorum. 
    at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:134) 
    at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:103) 
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) 
    at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76) 
    at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1684) 
13/07/14 06:33:23 INFO server.NIOServerCnxn: Closed socket connection for client /127.0.0.1:46283 (no session established for client) 

HBase的-site.xml中

<configuration> 
    <!-- Changing the default port for REST since it conflicts with yarn nodemanager --> 
    <property> 
    <name>hbase.rest.port</name> 
    <value>8070</value> 
    <description>The port for the HBase REST server.</description> 
    </property> 
    <property> 
    <name>hbase.rootdir</name> 
    <value>hdfs://localhost:8020/hbase</value> 
    </property> 
</configuration> 
+0

HBase的-site.xml中 配置> <! - 更改爲REST的默認端口,因爲它與紗線節點管理器衝突 - > hbase.rest.port 端口爲HBase的REST服務器。 hbase.rootdir hdfs:// localhost:8020/hbase user2580738

+0

做一個乾淨的開始。殺死所有的java進程並按正確的順序啓動每個節點。確保ZK的另一個實例未在任何此節點或其他節點上運行 –

回答

1

好像別的東西已經在使用的端口2181,或者你可能已經在這個端口上啓動了另一個ZK實例。要麼停止進程或更改其端口。如果這是不可能的,那麼在HBase的-site.xml中設置hbase.zookeeper.property.clientPort到。

請注意,即使在獨立模式下,HBase也需要ZK的服務,所以您應該確保它運行正常。

HTH

0

出人意料的是,它可以與特權的問題連接到端口2181,而不是2182而是./start-hbase.sh試試:

sudo ./start-hbase.sh 

在我它的幫助。

0

在獨立模式下啓動Hbase時,單個JVM託管HBase主服務器,HBase RegionServer和ZooKeeper仲裁對等服務器。所以,你不需要單獨啓動一個ZK實例。

在你的情況下,hbase無法啓動ZK,因爲另一個實例可能已經在端口2181上運行。所以,關閉ZooKeeper實例並重新啓動hbase。另外,請確保hbase rootdir具有適當的權限。