zookeeper flashback

Project scenario:

项目场景:Windows下启动Zookeeper


Problem Description

Windows下启动Zookeeper闪退


Cause Analysis:

Here is my zoo.cfg configuration file writing error


solution:

1. First find out why

insert image description here

Edit the bin/zkServer.cmd file

insert image description here
Add pause in the above position (do not close the window even if an error is reported, so as to check the reason)

Double-click zkServer.cmd to start zookeeper

insert image description here
Obviously the path here is incorrect

Open conf/zoo.cfg

// windows复制路径时默认为\分隔
dataDir=D:\develop\zookeeper-3.4.6\data
// 配置数据存放路径时要用/正斜杠分隔,不能\用反斜杠
dataDir=D:/develop/zookeeper-3.4.6/data

Restart zookeeper problem solved

Guess you like

Origin blog.csdn.net/weixin_52067659/article/details/126189298