无法启动apache zookeeper

jk9hmnmh  于 2021-06-04  发布在  Kafka
关注(0)|答案(0)|浏览(268)

运行zookeeper时出现此错误。我已经从官方网站下载了zookeeper,并尝试运行它而没有做任何更改。下面是我在控制台上遇到的错误。
我在Windows7上运行它

C:\Kafka\Latest\apache-zookeeper-3.5.5-bin>bin\zkServer.cmd conf\zoo.cfg

C:\Kafka\Latest\apache-zookeeper-3.5.5-bin>call "C:\Program Files\Java\jdk1.8.0_211"\bin\java "-Dzookeeper.log.dir=C:\Kafka\Latest\apache-zookeeper-3.5.5-bin\bin\..\logs" "-Dzookee
per.root.logger=INFO,CONSOLE" "-Dzookeeper.log.file=zookeeper-Swapnil-server-FIDEL-W7P-D23.log" "-XX:+HeapDumpOnOutOfMemoryError" "-XX:OnOutOfMemoryError=cmd /c taskkill /pid %%p /
t /f" -cp "C:\Kafka\Latest\apache-zookeeper-3.5.5-bin\bin\..\build\classes;C:\Kafka\Latest\apache-zookeeper-3.5.5-bin\bin\..\build\lib\*;C:\Kafka\Latest\apache-zookeeper-3.5.5-bin\
bin\..\*;C:\Kafka\Latest\apache-zookeeper-3.5.5-bin\bin\..\lib\*;C:\Kafka\Latest\apache-zookeeper-3.5.5-bin\bin\..\conf" org.apache.zookeeper.server.quorum.QuorumPeerMain "C:\Kafka
\Latest\apache-zookeeper-3.5.5-bin\bin\..\conf\zoo.cfg" conf\zoo.cfg
2019-06-28 18:01:42,928 [myid:] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2019-06-28 18:01:42,931 [myid:] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2019-06-28 18:01:42,931 [myid:] - INFO  [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2019-06-28 18:01:42,932 [myid:] - WARN  [main:QuorumPeerMain@125] - Either no config or no quorum defined in config, running  in standalone mode
2019-06-28 18:01:42,936 [myid:] - INFO  [main:ManagedUtil@46] - Log4j found with jmx enabled.
2019-06-28 18:01:43,000 [myid:] - ERROR [main:ZooKeeperServerMain@66] - Invalid arguments, exiting abnormally
java.lang.NumberFormatException: For input string: "C:\Kafka\Latest\apache-zookeeper-3.5.5-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:103)
        at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:64)
        at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:128)
        at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:82)
2019-06-28 18:01:43,002 [myid:] - INFO  [main:ZooKeeperServerMain@67] - Usage: ZooKeeperServerMain configfile | port datadir [ticktime] [maxcnxns]
Usage: ZooKeeperServerMain configfile | port datadir [ticktime] [maxcnxns]

请参阅下文zoo.cfg
动物园.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=/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

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题