I tested yesterday and it proves my theory. I'll share what I do under Windows on 1 PC here with you experienced guys and further newbies:
1>Download zookeeper 3.4.8. I unzip it and copy to 3 other different folders: zk_1, zk_2, zk_3. 2>For each zk_n folder, I do these things (Note: {n} means the last digit in zk_n foler name): a. Create zoo_data folder under root and create 'myid' with notepad, the contents is pure '{n}' only. b. Create zoo.cfg under conf folder with following contents: clientPort=218{n} initLimit=5 syncLimit=2 dataDir=D:/zk_{n}/zoo_data ;if p2p-coneect-port or leader-election-port are all same, then we should set maxClientCnxns=n ;maxClientCnxns=3 ;server.x=host:p2p-connect-port:leader-election-port server.1=localhost:2888:3888 server.2=localhost:2889:3889 server.3=localhost:2890:3890 3> I download ZOOKEEPER-1122's zkServer.cmd. and go into each zk_n folder and issue command: bin\zkServer.cmd start [Question]: There's something I'd like to ask guys: When I start zk_1, zk_2, the console keeps shows some warning messages. Only after I start zk_3, the warning messages is stopped. Is that normal? 4> I use zkui_win to see them all go online successfully. 5> I goto Solr-5.4.1 folder, and issue following commands: bin\solr start -c -s mynodes\node1 -z localhost:2181 bin\solr start -c -s mynodes\node1 -z localhost:2181 -p 7973 bin\solr create -c cugna -d myconfigsets\cugna -shards 1 -replicationFactor 2 -p 8983 6> By using zkui_win again, I see: ****** config 'cugna' are all synchronized on zk_1 to zk_3. So this proves my theory, we only have to specify only one zk nodes and they'll sync themselves. ****** [Question]: I go into zk_n folder and issue 'bin\zkServer stop'. However, this shows error message. It seems it can't taskkill the zk process for some reason. The only way I stop them is by closing DOS windows that has issued the 'bin\zkServer start' command. Does anybody know why 'bin\zkServer stop' doesn't work? Note: Gotta say sorry for the repitition of localhost:2181. It's my typo. scott.chu,scott....@udngroup.com 2016/5/18 (週三) ----- Original Message ----- From: Abdel Belkasri To: solr-user CC: Date: 2016/5/18 (週三) 00:17 Subject: Re: [scottchu] How to specify multiple zk nodes using solr startcommand under Windows The repetition is just a cut and paste from Scott's post. How can I check if I am getting the ensemble or just a single zk? Also if this is not the way to specify an ensemble, what is the right way? Because the comma delimited list does not work, I concur with Scott. On Tue, May 17, 2016 at 11:49 AM, Erick Erickson <erickerick...@gmail.com> wrote: > Are you absolutely sure you're getting an _ensemble_ and > not just connecting to a single node? My suspicion (without > proof) is that you're just getting one -z option. It'll work as > long as that ZK instance stays up, but it won't be fault-tolerant. > > And again you repeated the port (2181) twice. > > Best, > Erick > > On Tue, May 17, 2016 at 8:02 AM, Abdel Belkasri <belka...@gmail.com> > wrote: > > Hi Scott, > > what worked for me in Windows is this (no ",") > > bin\Solr start -c -s mynodes\node1 -z localhost:2181 -z localhost:2181 -z > > localhost:2183 > > > > -- Hope this helps > > Abdel. > > > > On Tue, May 17, 2016 at 3:35 AM, scott.chu <scott....@udngroup.com> > wrote: > > > >> I start 3 zk nodes at port 2181,2182, and 2183 on my local machine. > >> Go into Solr 5.4.1 root folder and issue and issue the command in > article > >> 'Setting Up an External ZooKeeper Ensemble' in reference guide > >> > >> bin\Solr start -c -s mynodes\node1 -z > >> localhost:2181,localhost:2181,localhost:2183 > >> > >> but it doesn't run but just show help page of start command in solr.cmd. > >> How should I issue the correct command? > >> > > > > > > > > -- > > Abdel K. Belkasri, PhD > -- Abdel K. Belkasri, PhD ----- 未在此訊息中找到病毒。 已透過 AVG 檢查 - www.avg.com 版本: 2015.0.6201 / 病毒庫: 4568/12251 - 發佈日期: 05/17/16