ZOOKEEPER[4] Installing Windows zookeeper, and problem handling

Source: Internet
Author: User
Tags zookeeper

Installation steps:

1, download the following path zookeeper-3.4.7.tar.gz

http://mirrors.cnnic.cn/apache/zookeeper/stable/

2. Extract zookeeper-3.4.7.tar.gz to the specified directory

3. Perform the following to the Conf directory:

CD D:\08zookeeper\zookeeper-3.4.7\conf

4, modify the Conf directory file Zoo_sample.cfg name is: zoo.cfg

Also modify the contents of the Zoo.cfg:

# The number of milliseconds of each tick
ticktime=2000 # This time is the time interval between the Zookeeper server or between the client and the server to maintain the heartbeat, that is, each ticktime time sends a heartbeat.
# The number of ticks that 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 are just
# example Sakes.
Datadir=d:\\09tmp\\zookeeper # as the name implies is zookeeper to save the data directory, by default, zookeeper will write the data log file is also stored in this directory.
# The port at which the clients would connect
clientport=2181 # This port is the port that the client connects to the Zookeeper server, Zookeeper listens to the port and accepts the client's access request.

5. Enter Bin directory: CD D:\08zookeeper\zookeeper-3.4.7\bin

6, execute zkserver.cmd, start Zookeeper Server service.

Issues encountered at startup

1. Java_home Error

D:\08zookeeper\zookeeper-3.4.7\bin>zkserver.cmd
The system could not find the path specified.
Error:java_home is incorrectly set.

Workaround:

Open the file Zkenv.cmd and make the following changes:

 1  if  not exist%java_home%\bin\java.exe (//add quotation marks   2  echo   Error:java_home is incorrectly set.  3   goto:eof  4 ) 
1 if " %java_home%\bin\java.exe " (2   Echo Error:java_home is incorrectly set. 3   goto:eof4 )

2. Not an internal or external command, nor a program that can be run

D:\08zookeeper\zookeeper-3.4.7\bin>call D:\Program Files\java\jdk1.7.0_79\bin\java "-dzookeeper.log.dir=d:\ 08zookeeper\zookeeper-3.4.7\bin\. " "-dzookeeper.root.logger=info,console"-CP "D:\08zookeeper\zookeeper-3.4.7\bin\. \build\classes;d
Per\zookeeper-3.4.7\bin\. \build\lib\*;D: \08zookeeper\zookeeper-3.4.7\bin\. \*;D: \08zookeeper\zookeeper-3.4.7\bin\. \lib\*;D: \08zookeeper\zookeeper-3.4.7\bin\. \conf "Org.apache.zookeeper.server.quorum.QuorumPeerMain" D:\08zookeeper\zookeep
In\. \conf\zoo.cfg "
' D:\Program ' is not an internal or external command, nor is it a running program
or batch file.

Workaround:

To modify the Zkenv.cmd file:

Set Java=%java_home%\bin\java changed to set java= "%java_home%\bin\java"

ZOOKEEPER[4] Installing Windows zookeeper, and problem handling

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.