master: java.net.BindException: Address already in use
master: at sun.nio.ch.Net.bind(Native Method)
master: at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:124)
master: at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
master: at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
master: at org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:111)
master: at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:130)
master: at org.apache.hadoop.hbase.zookeeper.HQuorumPeer.runZKServer(HQuorumPeer.java:73)
master: at org.apache.hadoop.hbase.zookeeper.HQuorumPeer.main(HQuorumPeer.java:63)
# 报错的原因是Zookeeper的端口被占用了或者Zookeeper已经启动了。
export HBASE_MANAGES_ZK=true
# 这个参数表示启动hbase之前自动启动zk
# 解决的办法有2种:
1.启动hbase的之前kill掉所有的zk进程,让hbase启动zk
2.将参数HBASE_MANAGES_ZK 改成false
# 在hbase之前手动启动zk
# 我这里使用的是方式一,可能之前zk的2181端口被其他应用占用了,所以kill掉所有占用2181端口的进程,再启动hbase就好用了