Hbase主人无法启动

时间:2013-07-14 10:38:29

标签: hadoop hbase

我正在尝试启动hbase master但收到以下错误:

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>

3 个答案:

答案 0 :(得分:2)

似乎其他东西已经在使用端口2181了,或者你可能早先在这个端口上启动了另一个ZK实例。要么停止该过程,要么更改其端口。如果无法做到这一点,请在 hbase-site.xml 中将 hbase.zookeeper.property.clientPort 设置为 2182

请注意,即使在独立模式下,HBase也需要ZK的服务,所以你应该确保它运行正常。

HTH

答案 1 :(得分:0)

令人惊讶的是,连接到端口2181的权限可能是一个问题,而不是2182.而不是./start-hbase.sh尝试:

sudo ./start-hbase.sh

就我而言,它有所帮助。

答案 2 :(得分:0)

在独立模式下启动Hbase时,单个JVM将承载HBase Master,HBase RegionServer和ZooKeeper仲裁对等体。因此,您不需要单独启动ZK实例。

在您的情况下,hbase无法启动ZK,因为另一个实例可能已在端口2181上运行。因此,只需关闭该ZooKeeper实例并重新启动hbase即可。另外,请确保对hbase rootdir具有适当的权限。