[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對應(yīng)的pid
sudo kill pid
重啟ZK婿崭,成功