user2580738
user2580738

Reputation: 81

Hbase master not able to start

I am trying to start hbase master but getting the below error:

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>

Upvotes: 4

Views: 10226

Answers (3)

Sarang Sharma
Sarang Sharma

Reputation: 28

When starting Hbase in standalone mode, a single JVM hosts the HBase Master, an HBase RegionServer, and a ZooKeeper quorum peer. So, you don't need to start a ZK instance separately.

In your case, hbase is not able to start the ZK because another instance is probably already running on port 2181. So, just close that ZooKeeper instance and restart hbase. Also, do ensure proper permissions for the hbase rootdir.

Upvotes: 0

APW
APW

Reputation: 61

Surprisingly, it can be an issue with privileges to connect to the port 2181, but not to 2182. Instead of ./start-hbase.sh try:

sudo ./start-hbase.sh

In my case it helped.

Upvotes: 1

Tariq
Tariq

Reputation: 34184

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

Upvotes: 2

Related Questions