Windows build zookeeper cluster error Invalid config, exiting abnormally

Source: Internet
Author: User
Tags zookeeper

The first attempt to build a ZK cluster on Windows is done on the basis of a single-machine ZK.

The Zoo.cfg file is displayed as follows and can be started normally.

#The number of milliseconds of each tickticktime=2000#The number of ticks that initial#synchronization phase can takeinitlimit=10#The number of ticks that can pass between#sending a request and getting an acknowledgementSynclimit=5#The directory where the snapshot is stored.#Don't use/tmp for storage,/tmp here's just#example sakes.Datadir=D:\Software\zookeeper\zk_data\server1#The port at which the clients would connectclientport=2181#The maximum number of client connections.#increase this if you need to handle more clients#maxclientcnxns=60##Be sure to read the Maintenance section of the#Administrator Guide before turning on Autopurge.##http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance##The number of snapshots to retain in DataDir#autopurge.snapretaincount=3#Purge task interval in hours#Set to ' 0 ' to disable Auto Purge feature#autopurge.purgeinterval=1
View Code

Replicate three nodes to increase the corresponding cluster configuration

server.1=localhost:2887:3887server. 2=localhost:2888:3888server. 3=localhost:2889:3889

Start

Sure enough, the error ...

Remove Server1=local...server2...server3 ... And can start normally, carefully check the three line configuration and there is no extra space ... This is also configured in the sublime.

" Draw_white_space " "  All "

Think of the solution, suddenly remembered that the log file should have additional information it ...

Sure enough

2018-03-30 21:38:13,591 [myID:]-ERROR [main:[email protected]]-Invalid Config, exiting Abnormallyorg.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing D:\Software\zookeeper\zookeeper-3.4.10-1\bin\. \conf\zoo.cfg at Org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse (Quorumpeerconfig.java:154) at Org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun (Quorumpeermain.java:101) at Org.apache.zookeeper.server.quorum.QuorumPeerMain.main (Quorumpeermain.java:78) caused By:java.lang.illegalargumentexception:d:softwarezookeeperzk_dataserver1\myid file is missing at Org.apac He.zookeeper.server.quorum.QuorumPeerConfig.parseProperties (Quorumpeerconfig.java:50W) at Org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse (Quorumpeerconfig.java:150)    ... 2 more

The snapshot log and transaction log are stored correctly according to the following path

Datadir=d:\software\zookeeper\zk_data\server1

Cluster find myID file on GG ... will be "\" as an escape character processing, so the path is wrong, unable to find the myID file to start the failure, modify the path after the restart everything OK//Todo tomorrow look at the source to check the two ways of processing

Datadir=D:\\software\\zookeeper\\zk_data\\server12018-03-30 21:59:15,784 [Myid:1]-INFO [main:[email protected]]-Currentepoch not found! Creating with a reasonabledefaultof 0. This should is happen when you are upgrading your installation2018-03-30 21:59:15,799 [Myid:1]-INFO [main:[email protected]]-Acceptedepoch not found! Creating with a reasonabledefaultof 0. This should is happen when you are upgrading your installation2018-03-30 21:59:15,810 [Myid:1]-INFO [Listenerthread:quorumcnxmanager$Listener@739]-My election bind port:localhost/127.0.0.1:38872018-03-30 21:59:15,817 [myid:1]-INFO [quorumpeer[myid=1]/0:0:0: 0:0:0:0:0:2181:[email protected]]-looking2018-03-30 21:59:15,819 [Myid:1]-INFO [quorumpeer[myid=1]/0:0:0:0:0:0:0:0:2181:[email protected]]-New election. My id = 1, proposed zxid=0x0

Ps:zookeeper log changes need to change log4j.properties Zookeeper.root.logger and Zkenv.cmd Zoo_log4j_prop, default is the console, I've changed to Rollingfile.

The LOG path needs to modify the Zoo_log_dir in Zkenv.cmd.

Log4j.properties in the zookeeper.log.dir=. Indicates the path of the command//TODO preliminary estimate Zkenv.cmd is not modified, it should be possible to change the absolute path here, tomorrow to verify

Tomorrow's normal work ~goodnight

Just e-mail to the blog Park to write off a unused account, the background to provide support services TX is pretty hard ~

Come on!

Windows builds zookeeper cluster error invalid config, exiting abnormally

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.