配置好ZK集群后,发现启动成功,但是使用status查看状态时,报错:
sh zookeeper/bin/zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /data/test/zookeeper/bin/../conf/zoo.cfg
myid could not be determined, will not able to locate clientPort in the server configs.
. Client address: localhost. Client SSL: false.
Error contacting service. It is probably not running.
经排查,发现是zoo.cfg这个文件的换行符是\r\n,所以要把这个文件的换行符改为\n