Server Zookeper tidak berfungsi (Server Tunggal)

Hai, saya mencoba menggunakan penjaga kebun binatang tetapi ketika saya mencoba untuk terhubung ke server saya mendapatkan log ini

D:\apache-zookeeper-3.6.1\bin>call "C:\Program Files\Java\jdk-14.0.2"\bin\java "-Dzookeeper.log.dir=D:\apache-zookeeper-3.6.1\bin\..\logs" "-Dzookeeper.root.logger=INFO,CONSOLE" "-Dzookeeper.log.file=zookeeper-krnim-server-LAPTOP-44Q1S1KH.log" "-XX:+HeapDumpOnOutOfMemoryError" "-XX:OnOutOfMemoryError=cmd /c taskkill /pid %%p /t /f" -cp "D:\apache-zookeeper-3.6.1\bin\..\build\classes;D:\apache-zookeeper-3.6.1\bin\..\build\lib\*;D:\apache-zookeeper-3.6.1\bin\..\*;D:\apache-zookeeper-3.6.1\bin\..\lib\*;D:\apache-zookeeper-3.6.1\bin\..\conf" org.apache.zookeeper.server.quorum.QuorumPeerMain "D:\apache-zookeeper-3.6.1\bin\..\conf\zoo.cfg" start
2020-08-13 09:12:12,507 [myid:] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2020-08-13 09:12:12,509 [myid:] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2020-08-13 09:12:12,510 [myid:] - INFO  [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2020-08-13 09:12:12,513 [myid:] - WARN  [main:QuorumPeerMain@138] - Either no config or no quorum defined in config, running in standalone mode
2020-08-13 09:12:12,516 [myid:] - INFO  [main:ManagedUtil@44] - Log4j 1.2 jmx support found and enabled.
2020-08-13 09:12:12,585 [myid:] - ERROR [main:ZooKeeperServerMain@69] - Invalid arguments, exiting abnormally
java.lang.NumberFormatException: For input string: "D:\apache-zookeeper-3.6.1\bin\..\conf\zoo.cfg"
        at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68)
        at java.base/java.lang.Integer.parseInt(Integer.java:652)
        at java.base/java.lang.Integer.parseInt(Integer.java:770)
        at org.apache.zookeeper.server.ServerConfig.parse(ServerConfig.java:78)
        at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:109)
        at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:67)
        at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:140)
        at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:90)
2020-08-13 09:12:12,587 [myid:] - INFO  [main:ZooKeeperServerMain@70] - Usage: ZooKeeperServerMain configfile | port datadir [ticktime] [maxcnxns]
Usage: ZooKeeperServerMain configfile | port datadir [ticktime] [maxcnxns]
2020-08-13 09:12:12,591 [myid:] - INFO  [main:ZKAuditProvider@42] - ZooKeeper audit is disabled.
2020-08-13 09:12:12,592 [myid:] - ERROR [main:ServiceUtils@42] - Exiting JVM with code 2

D:\apache-zookeeper-3.6.1\bin>endlocal

Ini adalah file konfigurasi saya:

 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:\apache-zookeeper-3.6.1-bin\logs
# 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

## Metrics Providers
#
# https://prometheus.io Metrics Exporter
#metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
#metricsProvider.httpPort=7000
#metricsProvider.exportJvmInfo=true

Apa masalahnya. saya mencari tetapi tidak dapat menemukan solusinya. Saya menggunakan windows. Saya juga mengalami masalah saat menggunakan cli. Saya seorang pemula jadi sangat sulit untuk memahaminya.


person Bruce    schedule 13.08.2020    source sumber
comment
mungkin pertanyaan duplikat; lihat tautan untuk detail lebih lanjut   -  person Guda uma shanker    schedule 23.12.2020


Jawaban (1)


Saya memiliki masalah yang sama. Saya membuat perubahan berikut pada dataDir dan kesalahan teratasi.

dataDir=jalur\\ke\\data\\direktori\\

Ini mungkin mengatasi kesalahan Anda.

person Rid    schedule 23.12.2020