到官网下载好zookeeper 3.5.5 zkServer.cmd 后 ,配置 zoo.cfg
dataDir=D:\\data\\zookeeper\\data
dataLogDir=D:\\data\\zookeeper\\logs
# the port at which the clients will connect
clientPort=2181
启动 zkServer.cmd ,结果出现以下错误。
D:\Program Files\apache-zookeeper-3.5.5\bin>call "D:\Program Files\Java\jdk1.8.0_92"\bin\java "-Dzookeeper.log.dir=D:\Program Files\apache-zookeeper-3.5.5\bin\..\logs" "-Dzookeeper.root.logger=INFO,CONSOLE" "-Dzookeeper.log.file=zookeeper-Administrator-server-ZLENNON.log" "-XX:+HeapDumpOnOutOfMemoryError" "-XX:OnOutOfMemoryError=cmd /c taskkill /pid %%p /t /f" -cp "D:\Program Files\apache-zookeeper-3.5.5\bin\..\build\classes;D:\Program Files\apache-zookeeper-3.5.5\bin\..\build\lib\*;D:\Program Files\apache-zookeeper-3.5.5\bin\..\*;D:\Program Files\apache-zookeeper-3.5.5\bin\..\lib\*;D:\Program Files\apache-zookeeper-3.5.5\bin\..\conf" org.apache.zookeeper.server.quorum.QuorumPeerMain "D:\Program Files\apache-zookeeper-3.5.5\bin\..\conf\zoo.cfg"
错误: 找不到或无法加载主类 org.apache.zookeeper.server.quorum.QuorumPeerMain
仔细一看自己下了源码文件, 应该下载 *-bin.tar.gz
分享到: