Zookeeperdata/zookeeper_server.pid:no such file or directory FAILED to WRITE PID error

Source: Internet
Author: User
Tags zookeeper

Today in the configuration ZK pseudo-cluster, found the following error:

Internet view some say because zoo.cfg configuration file "=" There are spaces before and after checking my profile and no space, so I ruled out this reason.


Finally resolved:

ZK's profile path parsing is really not smart enough, the path must be full path and start from the root directory, my path started with "~/xxxx" Such a path, it is clear that ZK does not know this "~" Home directory, change the problem solved later.

In addition, Online said "#" must have a space behind the comment, I verify that it is not true, and there is no reason ah, so the rumor.

And finally explain this zookeeper_. Server.pid is what, this is a again ZK start to create a file, inside is a PID, that is, the ZK run Pid,zk server script is the configuration file data path configuration to find this PID file, so that the server script to deal with which ZK process, so a Dan config file data directory configuration problem, then ZK service script can not find this PID file, will report the above error.

Finally, post my pseudo-cluster configuration file:

# The number of milliseconds of each tick ticktime=2000 # The number of ticks, the
initial 
# Synchronizati On phase can take
initlimit=10 # The number of
ticks so can pass between 
# Sending a request and getting an Acknowledgement
synclimit=5
# The directory where the snapshot is stored.
Datadir=~/zookeeper/workdir/server1/data
Datalogdir=/users/miracle/zookeeper/workdir/server1/log
# The Port at which the
"X" in the clients would connect clientport=2181

# server.x represents the identity of the zookeeper server process  
server.1= 127.0.0.1:2222:2225
server.2=127.0.0.1:3333:3335
server.3=127.0.0.1:4444:4445


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.