ZooKeeper启动错误 Invalid arguments, exiting abnormally 解决方案 Windows

泪湿孤枕 提交于 2019-12-05 04:20:56

使用bin中的脚本 zkServer.cmd 启动zookeeper,输入命令

D:\WORK\Project-Test\zookeeper-3.4.11\bin>zkServer.cmd start

发现无法启动,出现如下错误


2018-01-29 19:37:33,793 [myid:] - ERROR [main:ZooKeeperServerMain@57] - Invalid arguments, exiting abnormally
java.lang.NumberFormatException: For input string: "D:\WORK\Project-Test\zookeeper-3.4.11\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:61)
        at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:86)
        at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:55)
        at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:119)
        at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:81)

原因: 用法不对,start是在linux下用.sh脚本时的命令,在win下直接打脚本名就好

D:\WORK\Project-Test\zookeeper-3.4.11\bin>zkServer.cmd



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!