问题遇到的现象和发生背景
请问 apache-zookeeper-3.5.9-bin\bin zkServer.cmd start
java.lang.NumberFormatException: For input string: "D:\env\apache-zookeeper-3.5.9-bin\bin\..\conf\zoo.cfg"
D:\env\apache-zookeeper-3.5.9-bin\bin> zkServer.cmd start
D:\env\apache-zookeeper-3.5.9-bin\bin>call "D:\env\jdk1.8.0_251"\bin\java "-Dzookeeper.log.dir=D:\env\apache-zookeeper-3.5.9-bin\bin\..\logs" "-Dzookeeper.root.logger=INFO,CONSOLE" "-Dzookeeper.log.file=zookeeper-25004-server-LAPTOP-1M8KR3GR.log" "-XX:+HeapDumpOnOutOfMemoryError" "-XX:OnOutOfMemoryError=cmd /c taskkill /pid %%p /t /f" -cp "D:\env\apache-zookeeper-3.5.9-bin\bin\..\build\classes;D:\env\apache-zookeeper-3.5.9-bin\bin\..\build\lib\*;D:\env\apache-zookeeper-3.5.9-bin\bin\..\*;D:\env\apache-zookeeper-3.5.9-bin\bin\..\lib\*;D:\env\apache-zookeeper-3.5.9-bin\bin\..\conf" org.apache.zookeeper.server.quorum.QuorumPeerMain "D:\env\apache-zookeeper-3.5.9-bin\bin\..\conf\zoo.cfg" start
2022-10-27 12:01:00,956 [myid:] - INFO [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2022-10-27 12:01:00,960 [myid:] - INFO [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2022-10-27 12:01:00,962 [myid:] - INFO [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2022-10-27 12:01:00,964 [myid:] - WARN [main:QuorumPeerMain@125] - Either no config or no quorum defined in config, running in standalone mode
2022-10-27 12:01:00,969 [myid:] - INFO [main:ManagedUtil@45] - Log4j 1.2 jmx support found and enabled.
2022-10-27 12:01:01,022 [myid:] - ERROR [main:ZooKeeperServerMain@67] - Invalid arguments, exiting abnormally
java.lang.NumberFormatException: For input string: "D:\env\apache-zookeeper-3.5.9-bin\bin\..\conf\zoo.cfg"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at org.apache.zookeeper.server.ServerConfig.parse(ServerConfig.java:63)
at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:104)
at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:65)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:128)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:82)
2022-10-27 12:01:01,026 [myid:] - INFO [main:ZooKeeperServerMain@68] - Usage: ZooKeeperServerMain configfile | port datadir [ticktime] [maxcnxns]
Usage: ZooKeeperServerMain configfile | port datadir [ticktime] [maxcnxns]
D:\env\apache-zookeeper-3.5.9-bin\bin>endlocal
D:\env\apache-zookeeper-3.5.9-bin\conf\zoo.cfg
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=D:\zookeeper\data
# dataDir=/tmp/zookeeper
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1