无法写pid zookeeper安装zookeeper

问题描述 投票:0回答:1

我正在关注以前的帖子,但仍然无法解决问题。我正在尝试安装zookeeper并启动它来运行summing-bird,它运行以提供螺栓/喷口在线和批量风暴。我首先安装了zookeeper版本3.4.6,并且发现了类未找到异常。看完帖子后

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
java apache-storm apache-zookeeper
1个回答
0
投票

正如zoo.cfg的内容所述,你不应该把dataDir设置为/tmp/zookeeper

# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.

您可以尝试将dataDir设置为您创建的其他目录。然后重启zkServer.sh

© www.soinside.com 2019 - 2024. All rights reserved.