D:\ygl\apache-zookeeper-3.5.6-bin\bin>zkServer.cmd Error: JAVA_HOME is incorrectly set.
D:\ygl\apache-zookeeper-3.5.6-bin\bin>call “-Dzookeeper.log.dir=D:\ygl\apache-zookeeper-3.5.6-bin\bin…\logs” “-Dzookeeper.root.logger=INFO,CONSOLE” “-Dzookeeper.log.file=zookeeper-cll-server-UU-20200103GXMG.log” “-XX:+HeapDumpOnOutOfMemoryError” “-XX:OnOutOfMemoryError=cmd /c taskkill /pid %%p /t /f” -cp “D:\ygl\apache-zookeeper-3.5.6-bin\bin…\build\classes;D:\ygl\apache-zookeeper-3.5.6-bin\bin…\build\lib*;D:\ygl\apache-zookeeper-3.5.6-bin\bin…*;D:\ygl\apache-zookeeper-3.5.6-bin\bin…\lib*;D:\ygl\apache-zookeeper-3.5.6-bin\bin…\conf” org.apache.zookeeper.server.quorum.QuorumPeerMain “D:\ygl\apache-zookeeper-3.5.6-bin\bin…\confz\zoo.cfg” 文件名、目录名或卷标语法不正确。
编辑zkEnv.cmd
@REM setup java environment variables
if not defined JAVA_HOME ( echo Error: JAVA_HOME is not set. goto :eof )
set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_191
if not exist “%JAVA_HOME%”\bin\java.exe ( echo Error: JAVA_HOME is incorrectly set. goto :eof )
D:\ygl\apache-zookeeper-3.5.6-bin\bin>zkServer.cmd
D:\ygl\apache-zookeeper-3.5.6-bin\bin>call “C:\Program Files (x86)\Java\jdk1.8.0_191”\bin\java “-Dzookeeper.log.dir=D:\ygl\apache-zookeeper-3.5.6-bin\bin…\logs” “-Dzookeeper.root.logger=INFO,CONSOLE” “-Dzookeeper.log.file=zookeeper-cll-server-UU-20200103GXMG.log” “-XX:+HeapDumpOnOutOfMemoryError” “-XX:OnOutOfMemoryError=cmd /c taskkill /pid %%p /t /f” -cp “D:\ygl\apache-zookeeper-3.5.6-bin\bin…\build\classes;D:\ygl\apache-zookeeper-3.5.6-bin\bin…\build\lib*;D:\ygl\apache-zookeeper-3.5.6-bin\bin…*;D:\ygl\apache-zookeeper-3.5.6-bin\bin…\lib*;D:\ygl\apache-zookeeper-3.5.6-bin\bin…\conf” org.apache.zookeeper.server.quorum.QuorumPeerMain “D:\ygl\apache-zookeeper-3.5.6-bin\bin…\conf\zoo.cfg” 2021-11-13 22:24:11,792 [myid:] - INFO [main:QuorumPeerConfig@133] - Reading configuration from: D:\ygl\apache-zookeeper-3.5.6-bin\bin…\conf\zoo.cfg 2021-11-13 22:24:11,893 [myid:] - ERROR [main:QuorumPeerMain@89] - Invalid config, exiting abnormally org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing D:\ygl\apache-zookeeper-3.5.6-bin\bin…\conf\zoo.cfg at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:154) at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:113) at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:82) Caused by: java.lang.IllegalArgumentException: D:\ygl\apache-zookeeper-3.5.6-bin\bin…\conf\zoo.cfg file is missing at org.apache.zookeeper.server.util.VerifyingFileFactory.doFailForNonExistingPath(VerifyingFileFactory.java:51) at org.apache.zookeeper.server.util.VerifyingFileFactory.validate(VerifyingFileFactory.java:45) at org.apache.zookeeper.server.util.VerifyingFileFactory.create(VerifyingFileFactory.java:40) at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:139) … 2 more Invalid config, exiting abnormally
D:\ygl\apache-zookeeper-3.5.6-bin\bin>endlocal
D:\ygl\apache-zookeeper-3.5.6-bin\bin>
在conf目录下复制zoo_sample.cfg,粘贴并重命名为zoo.cfg dataDir=…/data data为上图中的data文件夹
|