3

我正在尝试启动 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>
4

3 回答 3

2

It seems like something else is already using port 2181, or perhaps you had started another ZK instance earlier on this port. Either stop that processe or change its port. If that's is not possible then set hbase.zookeeper.property.clientPort to 2182 in hbase-site.xml.

Please note that HBase needs ZK's services, even in standalone mode, so you should make sure that it's running OK.

HTH

于 2013-07-14T19:43:12.933 回答
1

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

sudo ./start-hbase.sh

就我而言,它有所帮助。

于 2016-12-14T13:42:54.703 回答
0

在独立模式下启动 Hbase 时,单个 JVM 托管 HBase Master、HBase RegionServer 和 ZooKeeper quorum peer。因此,您不需要单独启动 ZK 实例。

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

于 2018-02-07T09:41:07.247 回答