lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "scott.chu" <scott....@udngroup.com>
Subject Re: [scottchu] How to specify multiple zk nodes using solrstartcommand under Windows
Date Thu, 19 May 2016 10:03:21 GMT

I find a way to stop zk nodes peacefully under Windows.

If you start zk nodes in order of 1,2,3
then you should stop them in reverse order, i.e. 3,2,1
Thus you can stop process peacefully without any errors.

Hope this help people!

scott.chu,scott.chu@udngroup.com
2016/5/19 (週四)
----- Original Message ----- 
From: John Bickerstaff 
To: solr-user ; scott(自己) 
CC: 
Date: 2016/5/18 (週三) 13:53
Subject: Re: [scottchu] How to specify multiple zk nodes using solrstartcommand under Windows


I think those zk server warning messages are expected. Until you have 3 
running instances you don't have a "Quorum" and the Zookeeper instances 
complain. Once the third one comes up they are "happy" and don't complain 

any more. You'd get similar messages if one of the Zookeeper nodes ever 
went down. 

As for the stopping of zk server - I've never had any problem issuing a 
stop command, but I'm running Linux so I may not be much good to you in 
that regard. 

On Tue, May 17, 2016 at 8:41 PM, scott.chu <scott.chu@udngroup.com> wrote: 


> 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.chu@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 <erickerickson@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 <belkasri@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.chu@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 
> 



----- 
未在此訊息中找到病毒。 
已透過 AVG 檢查 - www.avg.com 
版本: 2015.0.6201 / 病毒庫: 4568/12251 - 發佈日期: 05/17/16
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message