【发布时间】:2018-09-12 21:17:15
【问题描述】:
我一直在关注以前的帖子,但仍然无法解决问题。我正在尝试安装 zookeeper 并启动它以运行 summing-bird,该运行旨在为在线和批处理提供螺栓/喷口风暴。我首先安装了zookeeper 3.4.6 版并且得到了class not found 异常。看完帖子
ClassNotFoundException for Zookeeper while building Storm
我将版本降级到 3.3.6,现在我什至无法启动 zookeeper 服务器。任何帮助将不胜感激。
root@cp-1:/users/username/zookeeper-3.3.6/bin# ./zkServer.sh start
JMX enabled by default
Using config: /users/username/zookeeper-3.3.6/bin/../conf/zoo.cfg
Starting zookeeper ... ./zkServer.sh: 93: [: /tmp/zookeeper/: unexpected operator
./zkServer.sh: 103: ./zkServer.sh: cannot create /tmp/zookeeper/
The number of snapshots to retain in dataDir/zookeeper_server.pid: Directory nonexistent
FAILED TO WRITE PID
这就是我的 zoo.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/
dataLogDir=/tmp/logs/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
server.1=10.11.10.3:2888:3888
server.2=10.11.10.4:2888:3888
这就是访问的样子
drwxr-xr-x 2 username oppts-PG0 4096 Nov 25 14:35 zookeeper
drwxr-xr-x 3 root root 4096 Nov 25 14:46 logs
drwxr-xr-x 2 root root 4096 Nov 25 14:46 logs/zookeeper
【问题讨论】:
-
错误说明脚本执行过程中出现错误。您是否在 bash shell 中运行?该脚本无法从您的配置文件中获取“dataDir”,因此内部脚本 var ZOOPIDFILE 为空并且脚本崩溃了...您是否指向正确的 zoo.cfg 文件,即在
/users/username/zookeeper-3.3.6/bin/../conf/zoo.cfg中?跨度> -
@MatthiasJ.Sax :是的,我指出了正确的方向。我通过下载最新版本的zookeeper然后将zkServer.sh文件复制到旧版本来解决这个问题,从那时起我就没有遇到这个问题了。这很奇怪,但它对我有用。
-
我不明白你是怎么解决的,你能说明一下我面临同样的问题吗
标签: java apache-storm apache-zookeeper