[hadoop@dn1 zkdata]$ zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /data/soft/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[hadoop@dn1 zkdata]$ jps
45387 Jps
[hadoop@dn1 zkdata]$ zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /data/soft/zookeeper/bin/../conf/zoo.cfg
Mode: follower
查看log,显示java.net.BindException: Address already in use]
原因:端口占用
解决方案:
sudo netstat -lnp|grep 2182
#找到2182对应的pid
sudo kill pid
重启ZK,成功