ZooKeeper environment

Zookeeper environment setup

download

download the latest version from the mirror site
http:/ /mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/
Download all historical versions from the documentation site
https://archive.apache.org/dist/zookeeper/
apache-zookeeper-3.5.5-bin.tar.gz 2019-05-20 18:40 10M
zookeeper-3.4.6.tar.gz 2016-01-10 17:11 17M

Reference document

https://zookeeper.apache.org/doc/r3.5.5/zookeeperStarted.html

Single machine environment

Create configuration file conf/zoo.cfg

tickTime=2000
dataDir=D:\\chengxu \\apache-zookeeper-3.4.6\\data
clientPort=2181

windows start

zkServer.cmd

D:\chengxu\apache-zookeeper-3.4.6\bin>zkServer.cmd

Linux start

zkServer.sh start

< h1 id="bugs">Bugs

An error was reported when starting zookeeper:
Caused by: java.net.BindException: Address already in use: bind
Reason:
zookeeper In the latest version, there is an embedded management console that is started via jetty, which will occupy port 8080.
Scheme:
Modify the port number:
1. Add -Dzookeeper.admin.serverPort=unoccupied port number in the startup script zkServer.cmd
2. In zoo.cfg Add admin.serverPort=unoccupied port number
Disable jetty AdminServer:
3. Add "-Dzookeeper.admin.enableServer=false" to the startup script zkServer.cmd
Effect:
2019-09-22 09:42:38,064 [myid:]-INFO [main:[email protected]]-Started AdminServer on address 0.0.0.0, port 7000 and command URL /commands
dataDir does not work after configuration
Reason:
Left slash is not escaped
Error:
D:\chengxu\apache-zookeeper-3.4.6\data
Correct:
D:\\chengxu\\apache-zookeeper-3.4.6\\data
D:/chengxu/apache-zookeeper-3.4.6/data

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4794 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.