启动hbase 报错 Address already in use 的解决办法

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已经启动了。

export HBASE_MANAGES_ZK=true

这个参数表示启动hbase之前自动启动zk

解决的办法有2种:

1.启动hbase的之前kill掉所有的 zk进程 让hbase启动zk

 

2.将参数HBASE_MANAGES_ZK 改成false

在hbase之前手动启动zk.

posted @ 2014-04-16 11:22  逍遥彩上飞  阅读(2306)  评论(0编辑  收藏  举报