HBase cannot connect to ZooKeeper

Source: Internet
Author: User
Tags builtin

HBase cannot connect to ZooKeeper

The following error is reported when you log on to the server after setting up the HBase Environment last time:

Hadoop @ gpmaster logs] $ hbase shell

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar: file:/home/hadoop/hbase-1.0.1.1/lib/slf4j-log4j12-1.7.7.jar! /Org/slf4j/impl/StaticLoggerBinder. class]
SLF4J: Found binding in [jar: file:/home/hadoop/hadoop-2.6.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar! /Org/slf4j/impl/StaticLoggerBinder. class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org. slf4j. impl. Log4jLoggerFactory]
17:27:40, 516 WARN [main] util. NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
HBase Shell; enter 'help <RETURN> 'for list of supported commands.
Type "exit <RETURN>" to leave the HBase Shell
Version 1.0.1.1, re1dbf4df30d214fca14908df71d038081577ea46, Sun May 17 12:34:26 PDT 2015


Hbase (main): 001: 0> status
ERROR: org. apache. hadoop. hbase. PleaseHoldException: Master is initializing
At org. apache. hadoop. hbase. master. HMaster. checkInitialized (HMaster. java: 1875)
At org. apache. hadoop. hbase. master. MasterRpcServices. getClusterStatus (MasterRpcServices. java: 691)
At org. apache. hadoop. hbase. protobuf. generated. MasterProtos $ MasterService $2. callBlockingMethod (MasterProtos. java: 42406)
At org. apache. hadoop. hbase. ipc. RpcServer. call (RpcServer. java: 2031)
At org. apache. hadoop. hbase. ipc. CallRunner. run (CallRunner. java: 107)
At org. apache. hadoop. hbase. ipc. RpcExecutor. consumerLoop (RpcExecutor. java: 130)
At org. apache. hadoop. hbase. ipc. RpcExecutor $ 1.run( RpcExecutor. java: 107)
At java. lang. Thread. run (Thread. java: 745)
Here is some help for this command:
Show cluster status. Can be 'summary ', 'simple', 'detailed', or 'replicase'.
Default is 'summary '. Examples:
Hbase> status
Hbase> status 'simple'
Hbase> status 'summary'
Hbase> status 'detailled'
Hbase> status 'replicase'
Hbase> status 'replicase', 'source'
Hbase> status 'replicase', 'sind'

Hbase (main): 002: 0>

After viewing the log/home/hadoop/hbase-1.0.1.1/logs/hbase-hadoop-regionserver-gpmaster.log,

Key error information found:
Client. HConnectionManager $ HConnectionImplementation: Can't get connection to ZooKeeper: keeperrorcode = ConnectionLoss for/hbase.
Based on the information, we can determine that zk cannot be connected. Run jps to check whether zk is normal. Check that the zk node configuration in the hbase-site.xml is normal. According to experience, the firewall is not closed and port 2181 cannot be accessed.
Run service iptables stop to disable the firewall and restart hbase. Go to hbase shell and execute list:


Hbase (main): 001: 0> list
TABLE
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar: file:/root/hadoop/hbase/lib/slf4j-log4j12-1.6.4.jar! /Org/slf4j/impl/StaticLoggerBinder. class]
SLF4J: Found binding in [jar: file:/root/hadoop/hadoop-2.2.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar! /Org/slf4j/impl/StaticLoggerBinder. class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
14:06:26, 013 WARN [main] util. NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

0 row (s) in 1.0070 seconds

=> []


In this way, everything is normal.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.