Zookeper服务器不会尝试建立仲裁

时间:2018-02-24 13:05:13

标签: apache-zookeeper

我下载了Zookeeper并在3个目录中解压缩:z1z2z3。在z1中,在/conf/zoo.cfg下我放置了此配置:

tickTime=2000
initLimit=10
syncLimit=5
dataDir=./data
clientPort=2181
server.1=127.0.0.1:2222:2223
server.2=127.0.0.1:3333:3334
server.3=127.0.0.1:4444:4445

z2z3中我添加了相同的配置,但此行除外:

clientPort=2182

clientPort=2183

我开始使用这样的第一台服务器:

./bin/zkServer.sh start-foreground ./z1.cfg

我原以为服务器会尝试建立仲裁并失败,因为其他两台服务器都没有运行。

但是,服务器仅显示此输出:

2018-02-24 12:43:08,840 [myid:] - INFO  [main:QuorumPeerConfig@116] - Reading configuration from: conf/zoo.cfg
2018-02-24 12:43:08,844 [myid:] - WARN  [main:VerifyingFileFactory@59] - conf/zoo.cfg is relative. Prepend ./ to indicate that you're sure!
2018-02-24 12:43:08,845 [myid:] - INFO  [main:QuorumPeerConfig@318] - clientPortAddress is 0.0.0.0/0.0.0.0:2181
2018-02-24 12:43:08,845 [myid:] - INFO  [main:QuorumPeerConfig@322] - secureClientPort is not set
2018-02-24 12:43:08,848 [myid:1] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2018-02-24 12:43:08,848 [myid:1] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2018-02-24 12:43:08,848 [myid:1] - INFO  [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2018-02-24 12:43:08,848 [myid:1] - WARN  [main:QuorumPeerMain@122] - Either no config or no quorum defined in config, running  in standalone mode
2018-02-24 12:43:08,849 [myid:1] - INFO  [main:ManagedUtil@46] - Log4j found with jmx enabled.
2018-02-24 12:43:08,858 [myid:1] - INFO  [main:QuorumPeerConfig@116] - Reading configuration from: conf/zoo.cfg
2018-02-24 12:43:08,858 [myid:1] - WARN  [main:VerifyingFileFactory@59] - conf/zoo.cfg is relative. Prepend ./ to indicate that you're sure!
2018-02-24 12:43:08,858 [myid:1] - INFO  [main:QuorumPeerConfig@318] - clientPortAddress is 0.0.0.0/0.0.0.0:2181
2018-02-24 12:43:08,858 [myid:1] - INFO  [main:QuorumPeerConfig@322] - secureClientPort is not set
2018-02-24 12:43:08,859 [myid:1] - INFO  [main:ZooKeeperServerMain@113] - Starting server
2018-02-24 12:43:08,871 [myid:1] - INFO  [main:Environment@109] - Server environment:zookeeper.version=3.5.2-alpha-1750793, built on 06/30/2016 13:15 GMT
2018-02-24 12:43:08,872 [myid:1] - INFO  [main:Environment@109] - Server environment:host.name=octavians-mbp
2018-02-24 12:43:08,873 [myid:1] - INFO  [main:Environment@109] - Server environment:java.version=1.8.0_60
2018-02-24 12:43:08,873 [myid:1] - INFO  [main:Environment@109] - Server environment:java.vendor=Oracle Corporation
2018-02-24 12:43:08,873 [myid:1] - INFO  [main:Environment@109] - Server environment:java.home=[SOME_PATH]
2018-02-24 12:43:08,873 [myid:1] - INFO  [main:Environment@109] - Server environment:java.class.path=[SOME_PATH]
2018-02-24 12:43:08,873 [myid:1] - INFO  [main:Environment@109] - Server environment:java.library.path=[SOME_PATH]
2018-02-24 12:43:08,873 [myid:1] - INFO  [main:Environment@109] - Server environment:java.io.tmpdir=/var/folders/d8/dxrq0j_d10s7twghyd6v5tdr0000gn/T/
2018-02-24 12:43:08,873 [myid:1] - INFO  [main:Environment@109] - Server environment:java.compiler=<NA>
2018-02-24 12:43:08,873 [myid:1] - INFO  [main:Environment@109] - Server environment:os.name=Mac OS X
2018-02-24 12:43:08,874 [myid:1] - INFO  [main:Environment@109] - Server environment:os.arch=x86_64
2018-02-24 12:43:08,874 [myid:1] - INFO  [main:Environment@109] - Server environment:os.version=10.12.4
2018-02-24 12:43:08,874 [myid:1] - INFO  [main:Environment@109] - Server environment:user.name=octavian
2018-02-24 12:43:08,874 [myid:1] - INFO  [main:Environment@109] - Server environment:user.home=[SOME_PATH]
2018-02-24 12:43:08,874 [myid:1] - INFO  [main:Environment@109] - Server environment:user.dir=[SOME_PATH]
2018-02-24 12:43:08,874 [myid:1] - INFO  [main:Environment@109] - Server environment:os.memory.free=235MB
2018-02-24 12:43:08,874 [myid:1] - INFO  [main:Environment@109] - Server environment:os.memory.max=889MB
2018-02-24 12:43:08,874 [myid:1] - INFO  [main:Environment@109] - Server environment:os.memory.total=245MB
2018-02-24 12:43:08,875 [myid:1] - INFO  [main:ZooKeeperServer@858] - minSessionTimeout set to 4000
2018-02-24 12:43:08,875 [myid:1] - INFO  [main:ZooKeeperServer@867] - maxSessionTimeout set to 40000
2018-02-24 12:43:08,876 [myid:1] - INFO  [main:ZooKeeperServer@156] - Created server with tickTime 2000 minSessionTimeout 4000 maxSessionTimeout 40000 datadir ./data/version-2 snapdir ./data/version-2
2018-02-24 12:43:08,892 [myid:1] - INFO  [main:Slf4jLog@67] - Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
2018-02-24 12:43:08,913 [myid:1] - INFO  [main:Slf4jLog@67] - jetty-6.1.26
2018-02-24 12:43:08,952 [myid:1] - INFO  [main:Slf4jLog@67] - Started SelectChannelConnector@0.0.0.0:8080
2018-02-24 12:43:08,958 [myid:1] - INFO  [main:JettyAdminServer@105] - Started AdminServer on address 0.0.0.0, port 8080 and command URL /commands
2018-02-24 12:43:08,967 [myid:1] - INFO  [main:NIOServerCnxnFactory@673] - Configuring NIO connection handler with 10s sessionless connection timeout, 2 selector thread(s), 16 worker threads, and 64 kB direct buffers.
2018-02-24 12:43:08,968 [myid:1] - INFO  [main:NIOServerCnxnFactory@686] - binding to port 0.0.0.0/0.0.0.0:2181
2018-02-24 12:43:08,983 [myid:1] - INFO  [main:FileSnap@83] - Reading snapshot ./data/version-2/snapshot.0
2018-02-24 12:43:08,986 [myid:1] - INFO  [main:FileTxnSnapLog@298] - Snapshotting: 0x0 to ./data/version-2/snapshot.0
2018-02-24 12:43:08,999 [myid:1] - INFO  [main:ContainerManager@64] - Using checkIntervalMs=60000 maxPerMinute=10000

所以我不明白它在做什么。

甚至试图建立法定人数?它失败了吗?

为什么它不提供有关仲裁的任何输出?

另外,我认为有一个名为zookeeper.out的输出文件,但我无法在文件系统上找到任何内容。

0 个答案:

没有答案