"Error" The Node/hbase is not in Zookeeper,hbase port occupancy does not start properly

Source: Internet
Author: User
Tags zookeeper

I started zookeeper after the start of HDFs, the last time to start hbase, found that the JPS process does not show the hmaster process, as follows:

[hadoop@hadoop000 bin]$ JPS
3936 NameNode
4241 secondarynamenode 6561
JPS
4041 DataNode
3418 Quorumpeermain

Then./hbase shell, found the following error:


This is my previous Hbase-site.xml configuration file:


In addition, my hbase-env.sh export hbase_manages_zk=true settings have been changed to False,java path is also set to, the following is the zoo.cfg in zookeeper:

# The number of milliseconds of each tick ticktime=2000 # The number of ticks, the
initial 
# Synchronizati On phase can take
initlimit=10 # The number of
ticks so can pass between 
# Sending a request and getting an Acknowledgement
synclimit=5
# The directory where the snapshot is stored.
# do not use/tmp for storage,/tmp here is just 
# example sakes.
DATADIR=/HOME/HADOOP/APP/TMP/ZK
# The port at which the clients would connect
clientport=2181
#
# be Sure to read the maintenance sections of the The 
# Administrator guide before turning on Autopurge.
# # # # # # # # # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance # #
Snapshots to retain in DataDir
#autopurge. snapretaincount=3
# Purge task interval in hours
# Set to ' 0 ' to Disable Auto Purge feature
#autopurge. purgeinterval=1
Find the reason, and then look at the log file in Hbase/log, and found this error message:

2017-11-17 12:01:24,469 INFO [main] server.  Zookeeperserver:server environment:user.dir=/home/hadoop/app/hbase-1.2.0-cdh5.7.0/bin 2017-11-17 12:01:24,477 INFO [main] server. zookeeperserver:created server with Ticktime minsessiontimeout 4000 maxsessiontimeout 40000 Datadir/tmp/hbase-hado Op/zookeeper/zookeeper_0/version-2 snapdir/tmp/hbase-hadoop/zookeeper/zookeeper_0/version-2 2017-11-17 12:01:24,485 INFO [main] server. Nioservercnxnfactory:binding to Port 0.0.0.0/0.0.0.0:2181 2017-11-17 12:01:24,486 INFO [main] server. Nioservercnxnfactory:binding to Port 0.0.0.0/0.0.0.0:2182 2017-11-17 12:01:24,490 INFO [main] persistence. Filesnap:reading snapshot/tmp/hbase-hadoop/zookeeper/zookeeper_0/version-2/snapshot.96 2017-11-17 12:01:24,501 INFO [main] persistence. filetxnsnaplog:snapshotting:0x96 to/tmp/hbase-hadoop/zookeeper/zookeeper_0/version-2/snapshot.96 2017-11-17 12:01:24,558 INFO [nioservercxn.factory:0.0.0.0/0.0.0.0:2182] server. nioservercnxnfactory:accepted socket Connection from/127.0.0.1:57611 2017-11-17 12:01:24,562 INFO [nioservercxn.factory:0.0.0.0/0.0.0.0:2182] server. Nioservercnxn:processing Stat command from/127.0.0.1:57611 2017-11-17 12:01:24,564 INFO [Thread-2] server. Nioservercnxn:stat command output 2017-11-17 12:01:24,564 INFO [main] zookeeper. Minizookeepercluster:started Minizookeepercluster and ran successful ' stat ' on client port=2182 2017-11-17 12:01:24,565 E rror [main] master.  Hmastercommandline:master exiting Java.io.IOException:Could not the start ZK at requested port of 2181.  ZK is started at port:2182.
	Aborting as clients (e.g. shell) is not being able to find this ZK quorum. At Org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster (hmastercommandline.java:213) at Org.apache.hadoop.hbase.master.HMasterCommandLine.run (hmastercommandline.java:138) at Org.apache.hadoop.util.ToolRunner.run (toolrunner.java:70) at Org.apache.hadoop.hbase.util.ServerCommandLine.doMain (servercommandline.java:126) at Org.apache.Hadoop.hbase.master.HMaster.main (hmaster.java:2446) 2017-11-17 12:01:24,566 INFO [Thread-2] server.
 nioservercnxn:closed Socket connection for client/127.0.0.1:57611 (no session established for client)

Since the previously started zookeeper has occupied 2181 ports, I dare not kill this process, but to see the hint is hbase need to start on this port, I began to think that HBase opened the zookeeper with my external open zookeeper conflict, On the internet also found a lot of methods, changed a variety of hbase-site.xml configuration files, but still no, ZK was started at port:2182, with this hint, I finally changed the 2181 port in Hbase-site.xml to 2182 and successfully started the Hmaster process:/hbase shell command is also working. The results of the operation are as follows:



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.