gpt4 book ai didi

apache-zookeeper - 无法启动动物园管理员

转载 作者:行者123 更新时间:2023-12-05 02:22:06 25 4
gpt4 key购买 nike

我正在尝试手动启动 zookeeper。我跑

# source zkServer.sh start

输出:

JMX enabled by default
Using config: /opt/zookeeper-3.4.6/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

当我运行#jps时,它输出

15360 QuorumPeerMain
15412 Jps

根据我在网上看到的,Zookeeper 与上面列出的 QuorumPeerMain 是同一个进程。但是当我使用

检查它的状态时
source zkServer.sh status

它卡在:

JMX enabled by default
Using config: /opt/zookeeper-3.4.6/bin/../conf/zoo.cfg

所以我跑

#source zkServer.sh status > templogs.txt

上面的运行使终端在下方闪烁片刻(我必须多次运行此命令才能在终端关闭之前读取终端上实际输出的内容)并关闭终端

JMX enabled by default
Using config:
grep: No such file or directory
grep: No such file or directory

写入 templogs.txt 如下

Error contacting service. It is probably not running.

当我打开 zookeeper.out 时,我可以看到这个输出:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/zookeeper-3.4.6/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/hive-0.12.0-cdh5.0.3/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/hbase-0.96.1.1-cdh5.0.3/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/spark-0.9.0-cdh/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/splicemachine/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
2015-06-29 15:49:40,831 [myid:] - INFO [main:QuorumPeerConfig@103] - Reading configuration from: /opt/zookeeper-3.4.6/bin/../conf/zoo.cfg
2015-06-29 15:49:40,836 [myid:] - INFO [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2015-06-29 15:49:40,836 [myid:] - INFO [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2015-06-29 15:49:40,836 [myid:] - INFO [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2015-06-29 15:49:40,837 [myid:] - WARN [main:QuorumPeerMain@113] - Either no config or no quorum defined in config, running in standalone mode
2015-06-29 15:49:40,847 [myid:] - INFO [main:QuorumPeerConfig@103] - Reading configuration from: /opt/zookeeper-3.4.6/bin/../conf/zoo.cfg
2015-06-29 15:49:40,847 [myid:] - INFO [main:ZooKeeperServerMain@95] - Starting server
2015-06-29 15:49:40,896 [myid:] - INFO [main:Environment@100] - Server environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2015-06-29 15:49:40,896 [myid:] - INFO [main:Environment@100] - Server environment:host.name=ingester
2015-06-29 15:49:40,896 [myid:] - INFO [main:Environment@100] - Server environment:java.version=1.8.0_25
2015-06-29 15:49:40,896 [myid:] - INFO [main:Environment@100] - Server environment:java.vendor=Oracle Corporation
2015-06-29 15:49:40,900 [myid:] - INFO [main:Environment@100] - Server environment:java.home=/usr/java/jdk1.8.0_25/jre
2015-06-29 15:49:40,901 [myid:] - INFO [main:Environment@100] - Server environment:java.class.path=/opt/zookeeper-3.4.6/bin/../build/classes:/opt

我省略了后面的大路径字符串,在下面给出了剩余的日志:

2015-06-29 15:49:40,902 [myid:] - INFO  [main:Environment@100] - Server environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2015-06-29 15:49:40,902 [myid:] - INFO [main:Environment@100] - Server environment:java.io.tmpdir=/tmp
2015-06-29 15:49:40,902 [myid:] - INFO [main:Environment@100] - Server environment:java.compiler=<NA>
2015-06-29 15:49:40,903 [myid:] - INFO [main:Environment@100] - Server environment:os.name=Linux
2015-06-29 15:49:40,903 [myid:] - INFO [main:Environment@100] - Server environment:os.arch=amd64
2015-06-29 15:49:40,903 [myid:] - INFO [main:Environment@100] - Server environment:os.version=3.17.8-200.fc20.x86_64
2015-06-29 15:49:40,903 [myid:] - INFO [main:Environment@100] - Server environment:user.name=root
2015-06-29 15:49:40,904 [myid:] - INFO [main:Environment@100] - Server environment:user.home=/root
2015-06-29 15:49:40,904 [myid:] - INFO [main:Environment@100] - Server environment:user.dir=/root
2015-06-29 15:49:40,909 [myid:] - INFO [main:ZooKeeperServer@755] - tickTime set to 2000
2015-06-29 15:49:40,909 [myid:] - INFO [main:ZooKeeperServer@764] - minSessionTimeout set to -1
2015-06-29 15:49:40,909 [myid:] - INFO [main:ZooKeeperServer@773] - maxSessionTimeout set to -1
2015-06-29 15:49:40,918 [myid:] - INFO [main:NIOServerCnxnFactory@94] - binding to port 0.0.0.0/0.0.0.0:2181

是不是像 zookeeper 一直卡在获取到 2181 端口的绑定(bind)?

但是当我运行 lsof -i:2181 -s 时,它输出:

COMMAND   PID USER   FD   TYPE   DEVICE SIZE NODE NAME
java 15360 root 467u IPv6 18340028 TCP *:eforward (LISTEN)

pid 是 QuorumPeerMain 的 pid。

在另一台 PC 上运行 source zkServer.sh status,正确给出

Mode: standalone

但在这台 PC 上,我几乎搞砸了。谁能帮帮我。

最佳答案

您是否已验证配置文件是否正常?

尝试使用配置文件完整路径运行 Zookeeper

示例:zkServer.sh 启动/etc/zookeeper/conf/zoo.cfg

关于apache-zookeeper - 无法启动动物园管理员,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31113775/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com