Jonathan Star 2022-10-27 12:07 采纳率: 77.5%
浏览 19
已结题

zookeeper NumberFormatException \conf\zoo.cfg

问题遇到的现象和发生背景

请问 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


用代码块功能插入代码,请勿粘贴截图
  • 写回答

1条回答 默认 最新

  • 「已注销」 2022-10-27 15:21
    关注

    这个问题怎么了呀

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 11月11日
  • 已采纳回答 11月3日
  • 创建了问题 10月27日

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改