window下zookeeper的下载启动和报错等问题

本文档记录了在Windows上下载和启动Zookeeper过程中遇到的问题及解决方案,包括启动错误提示JAVA_HOME未设置或设置不正确,以及因路径包含空格导致的启动失败。通过修改配置文件和处理路径中的特殊字符,成功解决了这两个问题。
摘要由CSDN通过智能技术生成

前言

在使用dubbo等需要用到zookeeper,之前window下本地部署,启动一直有问题,后面折腾了下才部署成功,此次记录下来,以备后用。

下载

百度或者google下zookeeper官网,里面就有下载的选项,还有其他的说明。简单下载下来就好了。

What is ZooKeeper?
ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.

Learn more about ZooKeeper on the ZooKeeper Wiki.

配置

将zookeeper下载之后,解压到指定目录即可,无需安装。例如:解压到D:\Program Service Files\zookeeper-3.5.0-alpha。(下载的是3.5.0版本)
解压好了之后,进入conf文件夹,会发现有2个文件,log4j.properties和zoo_sample.cfg这2个文件。对于zoo_sample.cfg文件,需要先将文件名字修改成zoo.cfg文件才行,接下来修改里面配置,如下所示,给出了注释和简单的配置信息。

# ZK中的一个时间单元。ZK中所有时间都是以这个时间单元为基础,进行整数倍配置的。例如,session的最小超时时间是2*tickTime。
tickTime=2000

# Follower在启动过程中,会从Leader同步所有最新数据,然后确定自己能够对外服务的起始
  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值