报错信息如下
2019-05-04 10:27:10,382 [myid:] - INFO [main:Environment@100] - Server environm
ent:=D:\zookeeper-3.4.6\bin
2019-05-04 10:27:10,387 [myid:] - ERROR [main:ZooKeeperServerMain@63] - Unexpect
ed exception, exiting abnormally
: Unable to create data directory D: mpdataDirzookeeper\versi
on-2
at .<init>(FileTxn
:85)
at (ZooKeep
:104)
at (ZooK
:86)
at (ZooKeeperServerM
:52)
at (Qu
:116)
at (QuorumPeerMain
.java:78)
解决办法:
conf\
中的dataDir目录使用双反斜杠“\\”,如:
dataDir=D:\\tmp\\dataDir\\zookeeper