首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法写入pid zookeeper安装zookeeper

无法写入pid zookeeper安装zookeeper
EN

Stack Overflow用户
提问于 2015-11-26 05:53:41
回答 1查看 1.5K关注 0票数 0

我一直在关注之前的帖子,但仍然无法解决这个问题。我正在尝试安装zookeeper并启动它来运行summing-bird,这是为了在线和批量提供螺栓/喷嘴。我首先安装了zookeeper版本3.4.6,并得到了类未找到异常。看了这篇文章之后

ClassNotFoundException for Zookeeper while building Storm

我把版本降到了3.3.6,现在我甚至不能启动zookeeper服务器。任何帮助都将不胜感激。

代码语言:javascript
复制
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文件的样子

代码语言:javascript
复制
# 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

下面是access的外观

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

发布于 2018-09-12 21:17:16

正如zoo.cfg的内容中所述,最好不要将dataDir设置为/tmp/zookeeper

代码语言:javascript
复制
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33927064

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档