Re: Setting up Solr on multiple machines
Hi, You should create below command on any of solr server. bin/solr create -c mytestcollection -d data_driven_schema_configs -shards 2 -replicationFactor 2 it will display as mytestcollection-- 1.>shard1 2.>shard2 both of shard will be point to solr1(server) and solr2 respectively. -- View this message in context: http://lucene.472066.n3.nabble.com/Setting-up-Solr-on-multiple-machines-tp4242343p4242681.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Setting up Solr on multiple machines
Correct me if I am wrong but my understanding is that even connecting to one zookeeper should be enough as internally that zookeeper will sync Solr server info to other zookeepers in the ensemble (as long as that zookeeper belongs to an ensemble). Having said that, if that particular zookeeper goes down, another one from the ensemble should be able to serve the Solr instance. What made me even more leaning towards this understanding is that I tried connecting 2 different solr instances to 2 different zookeepers (but both belong to the same ensemble) and I realized both Solr servers can see each other. I guess that does explain somehow that zookeepers are sharing solr servers information among the ensemble. Regards, Salman On Mon, Nov 30, 2015 at 1:07 AM, Walter Underwoodwrote: > Why would that link answer the question? > > Each Solr connects to one Zookeeper node. If that node goes down, > Zookeeper is still available, but the node will need to connect to a new > node. > > Specifying only one zk node is a single point of failure. If that node > goes down, Solr cannot continue operating. > > Specifying a list of all the zk nodes is robust. If one goes down, it > tries another. > > wunder > Walter Underwood > wun...@wunderwood.org > http://observer.wunderwood.org/ (my blog) > > > On Nov 29, 2015, at 12:19 PM, Don Bosco Durai wrote: > > > > This should answer your question: > https://zookeeper.apache.org/doc/r3.2.2/zookeeperOver.html#sc_designGoals > > > > On 11/29/15, 12:04 PM, "Salman Ansari" wrote: > > > >> my point is that what is the exact difference between the whole list and > >> one zookeeper? Moreover, I think this issue is related to Windows > command > >> as mentioned here > >> > http://stackoverflow.com/questions/28837827/solr-5-0-unable-to-start-solr-with-zookeeper-ensemble > >> > >> > >> On Sun, Nov 29, 2015 at 10:55 PM, Don Bosco Durai > wrote: > >> > >>> It is highly recommended to list all, but for testing, you might be > able > >>> to get away giving only one. > >>> > >>> If the list doesn’t work, then you might even want to look into > zookeeper > >>> and see whether they are setup properly. > >>> > >>> Bosco > >>> > >>> On 11/29/15, 11:51 AM, "Salman Ansari" > wrote: > >>> > but the point is: do I really need to list all the zookeepers in the > ensemble when starting solr or I can just specify one of them? > > On Sun, Nov 29, 2015 at 10:45 PM, Don Bosco Durai > >>> wrote: > > > You might want to check the logs for why solr is not starting up. > > > > > > Bosco > > > > > > On 11/29/15, 11:30 AM, "Salman Ansari" > wrote: > > > >> Thanks for your reply. > >> > >> > >> > >> Actually I am following the official guide to start solr using (on > >>> Windows > >> machines) > >> > >> > >> > >> bin/solr start -e cloud -z zk1:2181,zk2:2182,zk3:2183 > >> > >> (it is listed here > >> > > > >>> > https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble > >> ) > >> > >> > >> > >> However, I am facing 2 issues > >> > >> > >> > >> 1) If I specify the full list of ensemble (even with quotes around > -z > >> "zk1:2181,zk2:2182,zk3:2183") it does not start Solr on port 8983 > >> > >> > >> > >> > >> > >> 2) Then I tried the workaround, which is specifying "localhost" on > each > >> Solr server to consult its local Zookeeper instance that is part of > the > >> ensemble, which worked as follows > >> > >> > >> > >> bin/solr start -e cloud -z localhost:2181(on each machine that has > >> zookeeper as well) > >> > >> > >> > >> I followed the wizard (on each machine) to create 2 shards on 2 > ports > >>> and > > 2 > >> replicas. For the first machine I created "test" collection, but for > >>> the > >> second one I just reused the same collection. Now, Solr works on > both > >> machines but the issue is that when I see Solr admin page, it shows > all > > the > >> shards and replicas of the collection on ONE MACHINE. > >> > >> > >> Any ideas why I am facing these issues? > >> > >> > >> Regards, > >> > >> Salman > >> > >> On Sun, Nov 29, 2015 at 10:07 PM, Erick Erickson < > >>> erickerick...@gmail.com > >> > >> wrote: > >> > >>> 1> I'll pass > >>> > >>> 2a> yes. > >>> 2b> This should be automatic when you create the collection. You > >>> should specify numShards=2, replicationFactor=2 and > >>> maxShardsPerNode=2. Solr tries hard to distribute the shards and > >>> replicas on different machines. > >>> > >>> If you _really_ require exact placement, you can specify > >>> createNodeSet > >>>
Re: Setting up Solr on multiple machines
1> I'll pass 2a> yes. 2b> This should be automatic when you create the collection. You should specify numShards=2, replicationFactor=2 and maxShardsPerNode=2. Solr tries hard to distribute the shards and replicas on different machines. If you _really_ require exact placement, you can specify createNodeSet which will assign shards round-robin to the specified list or even EMPTY which will create no actual cores at all. In this latter case you could then use ADDREPLICA to place each shard and replica exactly where you want it to go. But I wouldn't bother first, just do what I outlined in 2b and it should be fine. Best, Erick On Sat, Nov 28, 2015 at 1:03 PM, Salman Ansariwrote: > I have started with one Zookeeper to test things and I have the following > questions > > 1) In my zoo.cfg I have defined > tickTime=4000 > dataDir=C:\\Solr\\Zookeeper\\zookeeper-3.4.6\\data > clientPort=2183 > > the strange thing is that it picks up dataDir and clientPort but always > keeps tickTime = 3000. Any idea why? > > 2) It is clear from the documentation how to create an ensemble of > Zookeepers on 3 machines but what I am not sure about is how to > a) Setup actual Solr on 2 machines (is it just installing Solr on > each server and then passing the same zookeeper ensemble)? > b) How to (using Solr Cloud) create 2 shards spread on 2 machines > with each machine having a replica of the other for high availability. So > server1 will have shard1 and replica2 and server2 will have shard2 and > replica1? > > Comments and feedback are appreciated. > > Regards, > Salman > > > On Fri, Nov 27, 2015 at 5:52 AM, Zheng Lin Edwin Yeo > wrote: > >> Yes, the ZooKeeper is Windows compatible. >> >> You can follow the guide, just need to replace the Linux commands with the >> Windows commands and paths >> >> Regards, >> Edwin >> >> >> On 26 November 2015 at 20:56, Alessandro Benedetti >> wrote: >> >> > I think it should be straightforward following the Solr wiki : >> > >> > >> > >> https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble >> > >> > I never played much in details with zookeeper ( never tried on a windows >> > machine), but I assume it is windows compatible ( I can see binaries >> .cmd ) >> > >> > Cheers >> > >> > On 26 November 2015 at 12:38, Salman Ansari >> > wrote: >> > >> > > Hi, >> > > >> > > I have seen the guide of setting up Solr on one machine as well as >> > setting >> > > it up on multiple machines on Liunx. Is there a good guide of how to >> > setup >> > > Solr on multiple machines on Windows Server with Zookeeper ensemble? My >> > > structure is as follows >> > > >> > > 1) 3 machines will have Zookeeper to create an ensemble >> > > 2) 2 of these machines will have Solr installed (with each having a >> > replica >> > > of other to provide high availability) >> > > >> > > Any link/article that provides such a guide? >> > > >> > > Regards, >> > > Salman >> > > >> > >> > >> > >> > -- >> > -- >> > >> > Benedetti Alessandro >> > Visiting card : http://about.me/alessandro_benedetti >> > >> > "Tyger, tyger burning bright >> > In the forests of the night, >> > What immortal hand or eye >> > Could frame thy fearful symmetry?" >> > >> > William Blake - Songs of Experience -1794 England >> > >>
Re: Setting up Solr on multiple machines
For 2a, assuming you want to tell Solr where to store the local indexes, in SolrCloud I have generally updated the solr.in.sh for the variable SOLR_HOME=. Make sure solr.xml is in that folder and optionally zoo.cfg. For 2b, as Erick mentioned, you need all three params. Solr by default will expect shards * replication factors number of servers. If you have less, than you will have to give the third parameter (maxShardsPerNode). Also, make sure you have all your Solr instance running when are giving your create collection command. Bosco On 11/29/15, 11:07 AM, "Erick Erickson"wrote: >1> I'll pass > >2a> yes. >2b> This should be automatic when you create the collection. You >should specify numShards=2, replicationFactor=2 and >maxShardsPerNode=2. Solr tries hard to distribute the shards and >replicas on different machines. > >If you _really_ require exact placement, you can specify createNodeSet >which will assign shards round-robin to the specified list or even >EMPTY which will create no actual cores at all. In this latter case >you could then use ADDREPLICA to place each shard and replica exactly >where you want it to go. > >But I wouldn't bother first, just do what I outlined in 2b and it >should be fine. > >Best, >Erick > >On Sat, Nov 28, 2015 at 1:03 PM, Salman Ansari wrote: >> I have started with one Zookeeper to test things and I have the following >> questions >> >> 1) In my zoo.cfg I have defined >> tickTime=4000 >> dataDir=C:\\Solr\\Zookeeper\\zookeeper-3.4.6\\data >> clientPort=2183 >> >> the strange thing is that it picks up dataDir and clientPort but always >> keeps tickTime = 3000. Any idea why? >> >> 2) It is clear from the documentation how to create an ensemble of >> Zookeepers on 3 machines but what I am not sure about is how to >> a) Setup actual Solr on 2 machines (is it just installing Solr on >> each server and then passing the same zookeeper ensemble)? >> b) How to (using Solr Cloud) create 2 shards spread on 2 machines >> with each machine having a replica of the other for high availability. So >> server1 will have shard1 and replica2 and server2 will have shard2 and >> replica1? >> >> Comments and feedback are appreciated. >> >> Regards, >> Salman >> >> >> On Fri, Nov 27, 2015 at 5:52 AM, Zheng Lin Edwin Yeo >> wrote: >> >>> Yes, the ZooKeeper is Windows compatible. >>> >>> You can follow the guide, just need to replace the Linux commands with the >>> Windows commands and paths >>> >>> Regards, >>> Edwin >>> >>> >>> On 26 November 2015 at 20:56, Alessandro Benedetti >>> wrote: >>> >>> > I think it should be straightforward following the Solr wiki : >>> > >>> > >>> > >>> https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble >>> > >>> > I never played much in details with zookeeper ( never tried on a windows >>> > machine), but I assume it is windows compatible ( I can see binaries >>> .cmd ) >>> > >>> > Cheers >>> > >>> > On 26 November 2015 at 12:38, Salman Ansari >>> > wrote: >>> > >>> > > Hi, >>> > > >>> > > I have seen the guide of setting up Solr on one machine as well as >>> > setting >>> > > it up on multiple machines on Liunx. Is there a good guide of how to >>> > setup >>> > > Solr on multiple machines on Windows Server with Zookeeper ensemble? My >>> > > structure is as follows >>> > > >>> > > 1) 3 machines will have Zookeeper to create an ensemble >>> > > 2) 2 of these machines will have Solr installed (with each having a >>> > replica >>> > > of other to provide high availability) >>> > > >>> > > Any link/article that provides such a guide? >>> > > >>> > > Regards, >>> > > Salman >>> > > >>> > >>> > >>> > >>> > -- >>> > -- >>> > >>> > Benedetti Alessandro >>> > Visiting card : http://about.me/alessandro_benedetti >>> > >>> > "Tyger, tyger burning bright >>> > In the forests of the night, >>> > What immortal hand or eye >>> > Could frame thy fearful symmetry?" >>> > >>> > William Blake - Songs of Experience -1794 England >>> > >>>
Re: Setting up Solr on multiple machines
Thanks for your reply. Actually I am following the official guide to start solr using (on Windows machines) bin/solr start -e cloud -z zk1:2181,zk2:2182,zk3:2183 (it is listed here https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble ) However, I am facing 2 issues 1) If I specify the full list of ensemble (even with quotes around -z "zk1:2181,zk2:2182,zk3:2183") it does not start Solr on port 8983 2) Then I tried the workaround, which is specifying "localhost" on each Solr server to consult its local Zookeeper instance that is part of the ensemble, which worked as follows bin/solr start -e cloud -z localhost:2181(on each machine that has zookeeper as well) I followed the wizard (on each machine) to create 2 shards on 2 ports and 2 replicas. For the first machine I created "test" collection, but for the second one I just reused the same collection. Now, Solr works on both machines but the issue is that when I see Solr admin page, it shows all the shards and replicas of the collection on ONE MACHINE. Any ideas why I am facing these issues? Regards, Salman On Sun, Nov 29, 2015 at 10:07 PM, Erick Ericksonwrote: > 1> I'll pass > > 2a> yes. > 2b> This should be automatic when you create the collection. You > should specify numShards=2, replicationFactor=2 and > maxShardsPerNode=2. Solr tries hard to distribute the shards and > replicas on different machines. > > If you _really_ require exact placement, you can specify createNodeSet > which will assign shards round-robin to the specified list or even > EMPTY which will create no actual cores at all. In this latter case > you could then use ADDREPLICA to place each shard and replica exactly > where you want it to go. > > But I wouldn't bother first, just do what I outlined in 2b and it > should be fine. > > Best, > Erick > > On Sat, Nov 28, 2015 at 1:03 PM, Salman Ansari > wrote: > > I have started with one Zookeeper to test things and I have the following > > questions > > > > 1) In my zoo.cfg I have defined > > tickTime=4000 > > dataDir=C:\\Solr\\Zookeeper\\zookeeper-3.4.6\\data > > clientPort=2183 > > > > the strange thing is that it picks up dataDir and clientPort but always > > keeps tickTime = 3000. Any idea why? > > > > 2) It is clear from the documentation how to create an ensemble of > > Zookeepers on 3 machines but what I am not sure about is how to > > a) Setup actual Solr on 2 machines (is it just installing Solr on > > each server and then passing the same zookeeper ensemble)? > > b) How to (using Solr Cloud) create 2 shards spread on 2 machines > > with each machine having a replica of the other for high availability. So > > server1 will have shard1 and replica2 and server2 will have shard2 and > > replica1? > > > > Comments and feedback are appreciated. > > > > Regards, > > Salman > > > > > > On Fri, Nov 27, 2015 at 5:52 AM, Zheng Lin Edwin Yeo < > edwinye...@gmail.com> > > wrote: > > > >> Yes, the ZooKeeper is Windows compatible. > >> > >> You can follow the guide, just need to replace the Linux commands with > the > >> Windows commands and paths > >> > >> Regards, > >> Edwin > >> > >> > >> On 26 November 2015 at 20:56, Alessandro Benedetti < > abenede...@apache.org> > >> wrote: > >> > >> > I think it should be straightforward following the Solr wiki : > >> > > >> > > >> > > >> > https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble > >> > > >> > I never played much in details with zookeeper ( never tried on a > windows > >> > machine), but I assume it is windows compatible ( I can see binaries > >> .cmd ) > >> > > >> > Cheers > >> > > >> > On 26 November 2015 at 12:38, Salman Ansari > >> > wrote: > >> > > >> > > Hi, > >> > > > >> > > I have seen the guide of setting up Solr on one machine as well as > >> > setting > >> > > it up on multiple machines on Liunx. Is there a good guide of how to > >> > setup > >> > > Solr on multiple machines on Windows Server with Zookeeper > ensemble? My > >> > > structure is as follows > >> > > > >> > > 1) 3 machines will have Zookeeper to create an ensemble > >> > > 2) 2 of these machines will have Solr installed (with each having a > >> > replica > >> > > of other to provide high availability) > >> > > > >> > > Any link/article that provides such a guide? > >> > > > >> > > Regards, > >> > > Salman > >> > > > >> > > >> > > >> > > >> > -- > >> > -- > >> > > >> > Benedetti Alessandro > >> > Visiting card : http://about.me/alessandro_benedetti > >> > > >> > "Tyger, tyger burning bright > >> > In the forests of the night, > >> > What immortal hand or eye > >> > Could frame thy fearful symmetry?" > >> > > >> > William Blake - Songs of Experience -1794 England > >> > > >> >
Re: Setting up Solr on multiple machines
You might want to check the logs for why solr is not starting up. Bosco On 11/29/15, 11:30 AM, "Salman Ansari"wrote: >Thanks for your reply. > > > >Actually I am following the official guide to start solr using (on Windows >machines) > > > >bin/solr start -e cloud -z zk1:2181,zk2:2182,zk3:2183 > >(it is listed here >https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble >) > > > >However, I am facing 2 issues > > > >1) If I specify the full list of ensemble (even with quotes around -z >"zk1:2181,zk2:2182,zk3:2183") it does not start Solr on port 8983 > > > > > >2) Then I tried the workaround, which is specifying "localhost" on each >Solr server to consult its local Zookeeper instance that is part of the >ensemble, which worked as follows > > > >bin/solr start -e cloud -z localhost:2181(on each machine that has >zookeeper as well) > > > >I followed the wizard (on each machine) to create 2 shards on 2 ports and 2 >replicas. For the first machine I created "test" collection, but for the >second one I just reused the same collection. Now, Solr works on both >machines but the issue is that when I see Solr admin page, it shows all the >shards and replicas of the collection on ONE MACHINE. > > >Any ideas why I am facing these issues? > > >Regards, > >Salman > >On Sun, Nov 29, 2015 at 10:07 PM, Erick Erickson >wrote: > >> 1> I'll pass >> >> 2a> yes. >> 2b> This should be automatic when you create the collection. You >> should specify numShards=2, replicationFactor=2 and >> maxShardsPerNode=2. Solr tries hard to distribute the shards and >> replicas on different machines. >> >> If you _really_ require exact placement, you can specify createNodeSet >> which will assign shards round-robin to the specified list or even >> EMPTY which will create no actual cores at all. In this latter case >> you could then use ADDREPLICA to place each shard and replica exactly >> where you want it to go. >> >> But I wouldn't bother first, just do what I outlined in 2b and it >> should be fine. >> >> Best, >> Erick >> >> On Sat, Nov 28, 2015 at 1:03 PM, Salman Ansari >> wrote: >> > I have started with one Zookeeper to test things and I have the following >> > questions >> > >> > 1) In my zoo.cfg I have defined >> > tickTime=4000 >> > dataDir=C:\\Solr\\Zookeeper\\zookeeper-3.4.6\\data >> > clientPort=2183 >> > >> > the strange thing is that it picks up dataDir and clientPort but always >> > keeps tickTime = 3000. Any idea why? >> > >> > 2) It is clear from the documentation how to create an ensemble of >> > Zookeepers on 3 machines but what I am not sure about is how to >> > a) Setup actual Solr on 2 machines (is it just installing Solr on >> > each server and then passing the same zookeeper ensemble)? >> > b) How to (using Solr Cloud) create 2 shards spread on 2 machines >> > with each machine having a replica of the other for high availability. So >> > server1 will have shard1 and replica2 and server2 will have shard2 and >> > replica1? >> > >> > Comments and feedback are appreciated. >> > >> > Regards, >> > Salman >> > >> > >> > On Fri, Nov 27, 2015 at 5:52 AM, Zheng Lin Edwin Yeo < >> edwinye...@gmail.com> >> > wrote: >> > >> >> Yes, the ZooKeeper is Windows compatible. >> >> >> >> You can follow the guide, just need to replace the Linux commands with >> the >> >> Windows commands and paths >> >> >> >> Regards, >> >> Edwin >> >> >> >> >> >> On 26 November 2015 at 20:56, Alessandro Benedetti < >> abenede...@apache.org> >> >> wrote: >> >> >> >> > I think it should be straightforward following the Solr wiki : >> >> > >> >> > >> >> > >> >> >> https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble >> >> > >> >> > I never played much in details with zookeeper ( never tried on a >> windows >> >> > machine), but I assume it is windows compatible ( I can see binaries >> >> .cmd ) >> >> > >> >> > Cheers >> >> > >> >> > On 26 November 2015 at 12:38, Salman Ansari >> >> > wrote: >> >> > >> >> > > Hi, >> >> > > >> >> > > I have seen the guide of setting up Solr on one machine as well as >> >> > setting >> >> > > it up on multiple machines on Liunx. Is there a good guide of how to >> >> > setup >> >> > > Solr on multiple machines on Windows Server with Zookeeper >> ensemble? My >> >> > > structure is as follows >> >> > > >> >> > > 1) 3 machines will have Zookeeper to create an ensemble >> >> > > 2) 2 of these machines will have Solr installed (with each having a >> >> > replica >> >> > > of other to provide high availability) >> >> > > >> >> > > Any link/article that provides such a guide? >> >> > > >> >> > > Regards, >> >> > > Salman >> >> > > >> >> > >> >> > >> >> > >> >> > -- >> >> > -- >> >> > >> >> > Benedetti Alessandro >> >> > Visiting card : http://about.me/alessandro_benedetti >> >> > >> >> > "Tyger, tyger burning
Re: Setting up Solr on multiple machines
It is highly recommended to list all, but for testing, you might be able to get away giving only one. If the list doesn’t work, then you might even want to look into zookeeper and see whether they are setup properly. Bosco On 11/29/15, 11:51 AM, "Salman Ansari"wrote: >but the point is: do I really need to list all the zookeepers in the >ensemble when starting solr or I can just specify one of them? > >On Sun, Nov 29, 2015 at 10:45 PM, Don Bosco Durai wrote: > >> You might want to check the logs for why solr is not starting up. >> >> >> Bosco >> >> >> On 11/29/15, 11:30 AM, "Salman Ansari" wrote: >> >> >Thanks for your reply. >> > >> > >> > >> >Actually I am following the official guide to start solr using (on Windows >> >machines) >> > >> > >> > >> >bin/solr start -e cloud -z zk1:2181,zk2:2182,zk3:2183 >> > >> >(it is listed here >> > >> https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble >> >) >> > >> > >> > >> >However, I am facing 2 issues >> > >> > >> > >> >1) If I specify the full list of ensemble (even with quotes around -z >> >"zk1:2181,zk2:2182,zk3:2183") it does not start Solr on port 8983 >> > >> > >> > >> > >> > >> >2) Then I tried the workaround, which is specifying "localhost" on each >> >Solr server to consult its local Zookeeper instance that is part of the >> >ensemble, which worked as follows >> > >> > >> > >> >bin/solr start -e cloud -z localhost:2181(on each machine that has >> >zookeeper as well) >> > >> > >> > >> >I followed the wizard (on each machine) to create 2 shards on 2 ports and >> 2 >> >replicas. For the first machine I created "test" collection, but for the >> >second one I just reused the same collection. Now, Solr works on both >> >machines but the issue is that when I see Solr admin page, it shows all >> the >> >shards and replicas of the collection on ONE MACHINE. >> > >> > >> >Any ideas why I am facing these issues? >> > >> > >> >Regards, >> > >> >Salman >> > >> >On Sun, Nov 29, 2015 at 10:07 PM, Erick Erickson > > >> >wrote: >> > >> >> 1> I'll pass >> >> >> >> 2a> yes. >> >> 2b> This should be automatic when you create the collection. You >> >> should specify numShards=2, replicationFactor=2 and >> >> maxShardsPerNode=2. Solr tries hard to distribute the shards and >> >> replicas on different machines. >> >> >> >> If you _really_ require exact placement, you can specify createNodeSet >> >> which will assign shards round-robin to the specified list or even >> >> EMPTY which will create no actual cores at all. In this latter case >> >> you could then use ADDREPLICA to place each shard and replica exactly >> >> where you want it to go. >> >> >> >> But I wouldn't bother first, just do what I outlined in 2b and it >> >> should be fine. >> >> >> >> Best, >> >> Erick >> >> >> >> On Sat, Nov 28, 2015 at 1:03 PM, Salman Ansari > > >> >> wrote: >> >> > I have started with one Zookeeper to test things and I have the >> following >> >> > questions >> >> > >> >> > 1) In my zoo.cfg I have defined >> >> > tickTime=4000 >> >> > dataDir=C:\\Solr\\Zookeeper\\zookeeper-3.4.6\\data >> >> > clientPort=2183 >> >> > >> >> > the strange thing is that it picks up dataDir and clientPort but >> always >> >> > keeps tickTime = 3000. Any idea why? >> >> > >> >> > 2) It is clear from the documentation how to create an ensemble of >> >> > Zookeepers on 3 machines but what I am not sure about is how to >> >> > a) Setup actual Solr on 2 machines (is it just installing Solr >> on >> >> > each server and then passing the same zookeeper ensemble)? >> >> > b) How to (using Solr Cloud) create 2 shards spread on 2 >> machines >> >> > with each machine having a replica of the other for high >> availability. So >> >> > server1 will have shard1 and replica2 and server2 will have shard2 and >> >> > replica1? >> >> > >> >> > Comments and feedback are appreciated. >> >> > >> >> > Regards, >> >> > Salman >> >> > >> >> > >> >> > On Fri, Nov 27, 2015 at 5:52 AM, Zheng Lin Edwin Yeo < >> >> edwinye...@gmail.com> >> >> > wrote: >> >> > >> >> >> Yes, the ZooKeeper is Windows compatible. >> >> >> >> >> >> You can follow the guide, just need to replace the Linux commands >> with >> >> the >> >> >> Windows commands and paths >> >> >> >> >> >> Regards, >> >> >> Edwin >> >> >> >> >> >> >> >> >> On 26 November 2015 at 20:56, Alessandro Benedetti < >> >> abenede...@apache.org> >> >> >> wrote: >> >> >> >> >> >> > I think it should be straightforward following the Solr wiki : >> >> >> > >> >> >> > >> >> >> > >> >> >> >> >> >> https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble >> >> >> > >> >> >> > I never played much in details with zookeeper ( never tried on a >> >> windows >> >> >> > machine), but I assume it is windows compatible ( I can see >> binaries >> >> >> .cmd ) >> >> >> > >> >> >> > Cheers
Re: Setting up Solr on multiple machines
This should answer your question: https://zookeeper.apache.org/doc/r3.2.2/zookeeperOver.html#sc_designGoals On 11/29/15, 12:04 PM, "Salman Ansari"wrote: >my point is that what is the exact difference between the whole list and >one zookeeper? Moreover, I think this issue is related to Windows command >as mentioned here >http://stackoverflow.com/questions/28837827/solr-5-0-unable-to-start-solr-with-zookeeper-ensemble > > >On Sun, Nov 29, 2015 at 10:55 PM, Don Bosco Durai wrote: > >> It is highly recommended to list all, but for testing, you might be able >> to get away giving only one. >> >> If the list doesn’t work, then you might even want to look into zookeeper >> and see whether they are setup properly. >> >> Bosco >> >> >> >> >> >> On 11/29/15, 11:51 AM, "Salman Ansari" wrote: >> >> >but the point is: do I really need to list all the zookeepers in the >> >ensemble when starting solr or I can just specify one of them? >> > >> >On Sun, Nov 29, 2015 at 10:45 PM, Don Bosco Durai >> wrote: >> > >> >> You might want to check the logs for why solr is not starting up. >> >> >> >> >> >> Bosco >> >> >> >> >> >> On 11/29/15, 11:30 AM, "Salman Ansari" wrote: >> >> >> >> >Thanks for your reply. >> >> > >> >> > >> >> > >> >> >Actually I am following the official guide to start solr using (on >> Windows >> >> >machines) >> >> > >> >> > >> >> > >> >> >bin/solr start -e cloud -z zk1:2181,zk2:2182,zk3:2183 >> >> > >> >> >(it is listed here >> >> > >> >> >> https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble >> >> >) >> >> > >> >> > >> >> > >> >> >However, I am facing 2 issues >> >> > >> >> > >> >> > >> >> >1) If I specify the full list of ensemble (even with quotes around -z >> >> >"zk1:2181,zk2:2182,zk3:2183") it does not start Solr on port 8983 >> >> > >> >> > >> >> > >> >> > >> >> > >> >> >2) Then I tried the workaround, which is specifying "localhost" on each >> >> >Solr server to consult its local Zookeeper instance that is part of the >> >> >ensemble, which worked as follows >> >> > >> >> > >> >> > >> >> >bin/solr start -e cloud -z localhost:2181(on each machine that has >> >> >zookeeper as well) >> >> > >> >> > >> >> > >> >> >I followed the wizard (on each machine) to create 2 shards on 2 ports >> and >> >> 2 >> >> >replicas. For the first machine I created "test" collection, but for >> the >> >> >second one I just reused the same collection. Now, Solr works on both >> >> >machines but the issue is that when I see Solr admin page, it shows all >> >> the >> >> >shards and replicas of the collection on ONE MACHINE. >> >> > >> >> > >> >> >Any ideas why I am facing these issues? >> >> > >> >> > >> >> >Regards, >> >> > >> >> >Salman >> >> > >> >> >On Sun, Nov 29, 2015 at 10:07 PM, Erick Erickson < >> erickerick...@gmail.com >> >> > >> >> >wrote: >> >> > >> >> >> 1> I'll pass >> >> >> >> >> >> 2a> yes. >> >> >> 2b> This should be automatic when you create the collection. You >> >> >> should specify numShards=2, replicationFactor=2 and >> >> >> maxShardsPerNode=2. Solr tries hard to distribute the shards and >> >> >> replicas on different machines. >> >> >> >> >> >> If you _really_ require exact placement, you can specify >> createNodeSet >> >> >> which will assign shards round-robin to the specified list or even >> >> >> EMPTY which will create no actual cores at all. In this latter case >> >> >> you could then use ADDREPLICA to place each shard and replica exactly >> >> >> where you want it to go. >> >> >> >> >> >> But I wouldn't bother first, just do what I outlined in 2b and it >> >> >> should be fine. >> >> >> >> >> >> Best, >> >> >> Erick >> >> >> >> >> >> On Sat, Nov 28, 2015 at 1:03 PM, Salman Ansari < >> salman.rah...@gmail.com >> >> > >> >> >> wrote: >> >> >> > I have started with one Zookeeper to test things and I have the >> >> following >> >> >> > questions >> >> >> > >> >> >> > 1) In my zoo.cfg I have defined >> >> >> > tickTime=4000 >> >> >> > dataDir=C:\\Solr\\Zookeeper\\zookeeper-3.4.6\\data >> >> >> > clientPort=2183 >> >> >> > >> >> >> > the strange thing is that it picks up dataDir and clientPort but >> >> always >> >> >> > keeps tickTime = 3000. Any idea why? >> >> >> > >> >> >> > 2) It is clear from the documentation how to create an ensemble of >> >> >> > Zookeepers on 3 machines but what I am not sure about is how to >> >> >> > a) Setup actual Solr on 2 machines (is it just installing >> Solr >> >> on >> >> >> > each server and then passing the same zookeeper ensemble)? >> >> >> > b) How to (using Solr Cloud) create 2 shards spread on 2 >> >> machines >> >> >> > with each machine having a replica of the other for high >> >> availability. So >> >> >> > server1 will have shard1 and replica2 and server2 will have shard2 >> and >> >> >> > replica1? >> >> >> > >> >> >> > Comments and feedback are appreciated. >> >> >> > >>
Re: Setting up Solr on multiple machines
Why would that link answer the question? Each Solr connects to one Zookeeper node. If that node goes down, Zookeeper is still available, but the node will need to connect to a new node. Specifying only one zk node is a single point of failure. If that node goes down, Solr cannot continue operating. Specifying a list of all the zk nodes is robust. If one goes down, it tries another. wunder Walter Underwood wun...@wunderwood.org http://observer.wunderwood.org/ (my blog) > On Nov 29, 2015, at 12:19 PM, Don Bosco Duraiwrote: > > This should answer your question: > https://zookeeper.apache.org/doc/r3.2.2/zookeeperOver.html#sc_designGoals > > On 11/29/15, 12:04 PM, "Salman Ansari" wrote: > >> my point is that what is the exact difference between the whole list and >> one zookeeper? Moreover, I think this issue is related to Windows command >> as mentioned here >> http://stackoverflow.com/questions/28837827/solr-5-0-unable-to-start-solr-with-zookeeper-ensemble >> >> >> On Sun, Nov 29, 2015 at 10:55 PM, Don Bosco Durai wrote: >> >>> It is highly recommended to list all, but for testing, you might be able >>> to get away giving only one. >>> >>> If the list doesn’t work, then you might even want to look into zookeeper >>> and see whether they are setup properly. >>> >>> Bosco >>> >>> On 11/29/15, 11:51 AM, "Salman Ansari" wrote: >>> but the point is: do I really need to list all the zookeepers in the ensemble when starting solr or I can just specify one of them? On Sun, Nov 29, 2015 at 10:45 PM, Don Bosco Durai >>> wrote: > You might want to check the logs for why solr is not starting up. > > > Bosco > > > On 11/29/15, 11:30 AM, "Salman Ansari" wrote: > >> Thanks for your reply. >> >> >> >> Actually I am following the official guide to start solr using (on >>> Windows >> machines) >> >> >> >> bin/solr start -e cloud -z zk1:2181,zk2:2182,zk3:2183 >> >> (it is listed here >> > >>> https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble >> ) >> >> >> >> However, I am facing 2 issues >> >> >> >> 1) If I specify the full list of ensemble (even with quotes around -z >> "zk1:2181,zk2:2182,zk3:2183") it does not start Solr on port 8983 >> >> >> >> >> >> 2) Then I tried the workaround, which is specifying "localhost" on each >> Solr server to consult its local Zookeeper instance that is part of the >> ensemble, which worked as follows >> >> >> >> bin/solr start -e cloud -z localhost:2181(on each machine that has >> zookeeper as well) >> >> >> >> I followed the wizard (on each machine) to create 2 shards on 2 ports >>> and > 2 >> replicas. For the first machine I created "test" collection, but for >>> the >> second one I just reused the same collection. Now, Solr works on both >> machines but the issue is that when I see Solr admin page, it shows all > the >> shards and replicas of the collection on ONE MACHINE. >> >> >> Any ideas why I am facing these issues? >> >> >> Regards, >> >> Salman >> >> On Sun, Nov 29, 2015 at 10:07 PM, Erick Erickson < >>> erickerick...@gmail.com >> >> wrote: >> >>> 1> I'll pass >>> >>> 2a> yes. >>> 2b> This should be automatic when you create the collection. You >>> should specify numShards=2, replicationFactor=2 and >>> maxShardsPerNode=2. Solr tries hard to distribute the shards and >>> replicas on different machines. >>> >>> If you _really_ require exact placement, you can specify >>> createNodeSet >>> which will assign shards round-robin to the specified list or even >>> EMPTY which will create no actual cores at all. In this latter case >>> you could then use ADDREPLICA to place each shard and replica exactly >>> where you want it to go. >>> >>> But I wouldn't bother first, just do what I outlined in 2b and it >>> should be fine. >>> >>> Best, >>> Erick >>> >>> On Sat, Nov 28, 2015 at 1:03 PM, Salman Ansari < >>> salman.rah...@gmail.com >> >>> wrote: I have started with one Zookeeper to test things and I have the > following questions 1) In my zoo.cfg I have defined tickTime=4000 dataDir=C:\\Solr\\Zookeeper\\zookeeper-3.4.6\\data clientPort=2183 the strange thing is that it picks up dataDir and clientPort but > always keeps tickTime = 3000. Any idea why? 2) It is clear from the documentation how to create an ensemble of Zookeepers on 3 machines
Re: Setting up Solr on multiple machines
Also I am interested in knowing how to create a collection where the replica and the same shard do not reside on the same machine. So, basically, shard1 with replica2 in one machine and shard2 with replica1 on the other machine. Is that by default when creating a collection of 2 shards and 2 replicas? On Nov 30, 2015 1:36 AM, "Salman Ansari"wrote: > Correct me if I am wrong but my understanding is that even connecting to > one zookeeper should be enough as internally that zookeeper will sync Solr > server info to other zookeepers in the ensemble (as long as that zookeeper > belongs to an ensemble). Having said that, if that particular zookeeper > goes down, another one from the ensemble should be able to serve the Solr > instance. > > What made me even more leaning towards this understanding is that I tried > connecting 2 different solr instances to 2 different zookeepers (but both > belong to the same ensemble) and I realized both Solr servers can see each > other. I guess that does explain somehow that zookeepers are sharing solr > servers information among the ensemble. > > Regards, > Salman > > On Mon, Nov 30, 2015 at 1:07 AM, Walter Underwood > wrote: > >> Why would that link answer the question? >> >> Each Solr connects to one Zookeeper node. If that node goes down, >> Zookeeper is still available, but the node will need to connect to a new >> node. >> >> Specifying only one zk node is a single point of failure. If that node >> goes down, Solr cannot continue operating. >> >> Specifying a list of all the zk nodes is robust. If one goes down, it >> tries another. >> >> wunder >> Walter Underwood >> wun...@wunderwood.org >> http://observer.wunderwood.org/ (my blog) >> >> > On Nov 29, 2015, at 12:19 PM, Don Bosco Durai wrote: >> > >> > This should answer your question: >> https://zookeeper.apache.org/doc/r3.2.2/zookeeperOver.html#sc_designGoals >> > >> > On 11/29/15, 12:04 PM, "Salman Ansari" wrote: >> > >> >> my point is that what is the exact difference between the whole list >> and >> >> one zookeeper? Moreover, I think this issue is related to Windows >> command >> >> as mentioned here >> >> >> http://stackoverflow.com/questions/28837827/solr-5-0-unable-to-start-solr-with-zookeeper-ensemble >> >> >> >> >> >> On Sun, Nov 29, 2015 at 10:55 PM, Don Bosco Durai >> wrote: >> >> >> >>> It is highly recommended to list all, but for testing, you might be >> able >> >>> to get away giving only one. >> >>> >> >>> If the list doesn’t work, then you might even want to look into >> zookeeper >> >>> and see whether they are setup properly. >> >>> >> >>> Bosco >> >>> >> >>> On 11/29/15, 11:51 AM, "Salman Ansari" >> wrote: >> >>> >> but the point is: do I really need to list all the zookeepers in the >> ensemble when starting solr or I can just specify one of them? >> >> On Sun, Nov 29, 2015 at 10:45 PM, Don Bosco Durai >> >>> wrote: >> >> > You might want to check the logs for why solr is not starting up. >> > >> > >> > Bosco >> > >> > >> > On 11/29/15, 11:30 AM, "Salman Ansari" >> wrote: >> > >> >> Thanks for your reply. >> >> >> >> >> >> >> >> Actually I am following the official guide to start solr using (on >> >>> Windows >> >> machines) >> >> >> >> >> >> >> >> bin/solr start -e cloud -z zk1:2181,zk2:2182,zk3:2183 >> >> >> >> (it is listed here >> >> >> > >> >>> >> https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble >> >> ) >> >> >> >> >> >> >> >> However, I am facing 2 issues >> >> >> >> >> >> >> >> 1) If I specify the full list of ensemble (even with quotes around >> -z >> >> "zk1:2181,zk2:2182,zk3:2183") it does not start Solr on port 8983 >> >> >> >> >> >> >> >> >> >> >> >> 2) Then I tried the workaround, which is specifying "localhost" on >> each >> >> Solr server to consult its local Zookeeper instance that is part >> of the >> >> ensemble, which worked as follows >> >> >> >> >> >> >> >> bin/solr start -e cloud -z localhost:2181(on each machine that has >> >> zookeeper as well) >> >> >> >> >> >> >> >> I followed the wizard (on each machine) to create 2 shards on 2 >> ports >> >>> and >> > 2 >> >> replicas. For the first machine I created "test" collection, but >> for >> >>> the >> >> second one I just reused the same collection. Now, Solr works on >> both >> >> machines but the issue is that when I see Solr admin page, it >> shows all >> > the >> >> shards and replicas of the collection on ONE MACHINE. >> >> >> >> >> >> Any ideas why I am facing these issues? >> >> >> >> >> >> Regards, >> >> >> >> Salman >>
Re: Setting up Solr on multiple machines
Connecting to one Zookeeper node is fine. Until that node fails. Then what does Solr do for cluster information? The entire point of Zookeeper is to share that information in a reliable, fault-tolerant way. Solr can talk to any Zookeeper node and get the same information. wunder Walter Underwood wun...@wunderwood.org http://observer.wunderwood.org/ (my blog) > On Nov 29, 2015, at 2:36 PM, Salman Ansariwrote: > > Correct me if I am wrong but my understanding is that even connecting to > one zookeeper should be enough as internally that zookeeper will sync Solr > server info to other zookeepers in the ensemble (as long as that zookeeper > belongs to an ensemble). Having said that, if that particular zookeeper > goes down, another one from the ensemble should be able to serve the Solr > instance. > > What made me even more leaning towards this understanding is that I tried > connecting 2 different solr instances to 2 different zookeepers (but both > belong to the same ensemble) and I realized both Solr servers can see each > other. I guess that does explain somehow that zookeepers are sharing solr > servers information among the ensemble. > > Regards, > Salman > > On Mon, Nov 30, 2015 at 1:07 AM, Walter Underwood > wrote: > >> Why would that link answer the question? >> >> Each Solr connects to one Zookeeper node. If that node goes down, >> Zookeeper is still available, but the node will need to connect to a new >> node. >> >> Specifying only one zk node is a single point of failure. If that node >> goes down, Solr cannot continue operating. >> >> Specifying a list of all the zk nodes is robust. If one goes down, it >> tries another. >> >> wunder >> Walter Underwood >> wun...@wunderwood.org >> http://observer.wunderwood.org/ (my blog) >> >>> On Nov 29, 2015, at 12:19 PM, Don Bosco Durai wrote: >>> >>> This should answer your question: >> https://zookeeper.apache.org/doc/r3.2.2/zookeeperOver.html#sc_designGoals >>> >>> On 11/29/15, 12:04 PM, "Salman Ansari" wrote: >>> my point is that what is the exact difference between the whole list and one zookeeper? Moreover, I think this issue is related to Windows >> command as mentioned here >> http://stackoverflow.com/questions/28837827/solr-5-0-unable-to-start-solr-with-zookeeper-ensemble On Sun, Nov 29, 2015 at 10:55 PM, Don Bosco Durai >> wrote: > It is highly recommended to list all, but for testing, you might be >> able > to get away giving only one. > > If the list doesn’t work, then you might even want to look into >> zookeeper > and see whether they are setup properly. > > Bosco > > On 11/29/15, 11:51 AM, "Salman Ansari" >> wrote: > >> but the point is: do I really need to list all the zookeepers in the >> ensemble when starting solr or I can just specify one of them? >> >> On Sun, Nov 29, 2015 at 10:45 PM, Don Bosco Durai > wrote: >> >>> You might want to check the logs for why solr is not starting up. >>> >>> >>> Bosco >>> >>> >>> On 11/29/15, 11:30 AM, "Salman Ansari" >> wrote: >>> Thanks for your reply. Actually I am following the official guide to start solr using (on > Windows machines) bin/solr start -e cloud -z zk1:2181,zk2:2182,zk3:2183 (it is listed here >>> > >> https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble ) However, I am facing 2 issues 1) If I specify the full list of ensemble (even with quotes around >> -z "zk1:2181,zk2:2182,zk3:2183") it does not start Solr on port 8983 2) Then I tried the workaround, which is specifying "localhost" on >> each Solr server to consult its local Zookeeper instance that is part of >> the ensemble, which worked as follows bin/solr start -e cloud -z localhost:2181(on each machine that has zookeeper as well) I followed the wizard (on each machine) to create 2 shards on 2 >> ports > and >>> 2 replicas. For the first machine I created "test" collection, but for > the second one I just reused the same collection. Now, Solr works on >> both machines but the issue is that when I see Solr admin page, it shows >> all >>> the shards and replicas of the collection on ONE MACHINE. Any ideas why I am facing these issues? Regards,
Re: Setting up Solr on multiple machines
but the point is: do I really need to list all the zookeepers in the ensemble when starting solr or I can just specify one of them? On Sun, Nov 29, 2015 at 10:45 PM, Don Bosco Duraiwrote: > You might want to check the logs for why solr is not starting up. > > > Bosco > > > On 11/29/15, 11:30 AM, "Salman Ansari" wrote: > > >Thanks for your reply. > > > > > > > >Actually I am following the official guide to start solr using (on Windows > >machines) > > > > > > > >bin/solr start -e cloud -z zk1:2181,zk2:2182,zk3:2183 > > > >(it is listed here > > > https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble > >) > > > > > > > >However, I am facing 2 issues > > > > > > > >1) If I specify the full list of ensemble (even with quotes around -z > >"zk1:2181,zk2:2182,zk3:2183") it does not start Solr on port 8983 > > > > > > > > > > > >2) Then I tried the workaround, which is specifying "localhost" on each > >Solr server to consult its local Zookeeper instance that is part of the > >ensemble, which worked as follows > > > > > > > >bin/solr start -e cloud -z localhost:2181(on each machine that has > >zookeeper as well) > > > > > > > >I followed the wizard (on each machine) to create 2 shards on 2 ports and > 2 > >replicas. For the first machine I created "test" collection, but for the > >second one I just reused the same collection. Now, Solr works on both > >machines but the issue is that when I see Solr admin page, it shows all > the > >shards and replicas of the collection on ONE MACHINE. > > > > > >Any ideas why I am facing these issues? > > > > > >Regards, > > > >Salman > > > >On Sun, Nov 29, 2015 at 10:07 PM, Erick Erickson > > >wrote: > > > >> 1> I'll pass > >> > >> 2a> yes. > >> 2b> This should be automatic when you create the collection. You > >> should specify numShards=2, replicationFactor=2 and > >> maxShardsPerNode=2. Solr tries hard to distribute the shards and > >> replicas on different machines. > >> > >> If you _really_ require exact placement, you can specify createNodeSet > >> which will assign shards round-robin to the specified list or even > >> EMPTY which will create no actual cores at all. In this latter case > >> you could then use ADDREPLICA to place each shard and replica exactly > >> where you want it to go. > >> > >> But I wouldn't bother first, just do what I outlined in 2b and it > >> should be fine. > >> > >> Best, > >> Erick > >> > >> On Sat, Nov 28, 2015 at 1:03 PM, Salman Ansari > > >> wrote: > >> > I have started with one Zookeeper to test things and I have the > following > >> > questions > >> > > >> > 1) In my zoo.cfg I have defined > >> > tickTime=4000 > >> > dataDir=C:\\Solr\\Zookeeper\\zookeeper-3.4.6\\data > >> > clientPort=2183 > >> > > >> > the strange thing is that it picks up dataDir and clientPort but > always > >> > keeps tickTime = 3000. Any idea why? > >> > > >> > 2) It is clear from the documentation how to create an ensemble of > >> > Zookeepers on 3 machines but what I am not sure about is how to > >> > a) Setup actual Solr on 2 machines (is it just installing Solr > on > >> > each server and then passing the same zookeeper ensemble)? > >> > b) How to (using Solr Cloud) create 2 shards spread on 2 > machines > >> > with each machine having a replica of the other for high > availability. So > >> > server1 will have shard1 and replica2 and server2 will have shard2 and > >> > replica1? > >> > > >> > Comments and feedback are appreciated. > >> > > >> > Regards, > >> > Salman > >> > > >> > > >> > On Fri, Nov 27, 2015 at 5:52 AM, Zheng Lin Edwin Yeo < > >> edwinye...@gmail.com> > >> > wrote: > >> > > >> >> Yes, the ZooKeeper is Windows compatible. > >> >> > >> >> You can follow the guide, just need to replace the Linux commands > with > >> the > >> >> Windows commands and paths > >> >> > >> >> Regards, > >> >> Edwin > >> >> > >> >> > >> >> On 26 November 2015 at 20:56, Alessandro Benedetti < > >> abenede...@apache.org> > >> >> wrote: > >> >> > >> >> > I think it should be straightforward following the Solr wiki : > >> >> > > >> >> > > >> >> > > >> >> > >> > https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble > >> >> > > >> >> > I never played much in details with zookeeper ( never tried on a > >> windows > >> >> > machine), but I assume it is windows compatible ( I can see > binaries > >> >> .cmd ) > >> >> > > >> >> > Cheers > >> >> > > >> >> > On 26 November 2015 at 12:38, Salman Ansari < > salman.rah...@gmail.com> > >> >> > wrote: > >> >> > > >> >> > > Hi, > >> >> > > > >> >> > > I have seen the guide of setting up Solr on one machine as well > as > >> >> > setting > >> >> > > it up on multiple machines on Liunx. Is there a good guide of > how to > >> >> > setup > >> >> > > Solr on multiple machines on Windows Server with Zookeeper > >> ensemble? My > >> >> > > structure is as
Re: Setting up Solr on multiple machines
my point is that what is the exact difference between the whole list and one zookeeper? Moreover, I think this issue is related to Windows command as mentioned here http://stackoverflow.com/questions/28837827/solr-5-0-unable-to-start-solr-with-zookeeper-ensemble On Sun, Nov 29, 2015 at 10:55 PM, Don Bosco Duraiwrote: > It is highly recommended to list all, but for testing, you might be able > to get away giving only one. > > If the list doesn’t work, then you might even want to look into zookeeper > and see whether they are setup properly. > > Bosco > > > > > > On 11/29/15, 11:51 AM, "Salman Ansari" wrote: > > >but the point is: do I really need to list all the zookeepers in the > >ensemble when starting solr or I can just specify one of them? > > > >On Sun, Nov 29, 2015 at 10:45 PM, Don Bosco Durai > wrote: > > > >> You might want to check the logs for why solr is not starting up. > >> > >> > >> Bosco > >> > >> > >> On 11/29/15, 11:30 AM, "Salman Ansari" wrote: > >> > >> >Thanks for your reply. > >> > > >> > > >> > > >> >Actually I am following the official guide to start solr using (on > Windows > >> >machines) > >> > > >> > > >> > > >> >bin/solr start -e cloud -z zk1:2181,zk2:2182,zk3:2183 > >> > > >> >(it is listed here > >> > > >> > https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble > >> >) > >> > > >> > > >> > > >> >However, I am facing 2 issues > >> > > >> > > >> > > >> >1) If I specify the full list of ensemble (even with quotes around -z > >> >"zk1:2181,zk2:2182,zk3:2183") it does not start Solr on port 8983 > >> > > >> > > >> > > >> > > >> > > >> >2) Then I tried the workaround, which is specifying "localhost" on each > >> >Solr server to consult its local Zookeeper instance that is part of the > >> >ensemble, which worked as follows > >> > > >> > > >> > > >> >bin/solr start -e cloud -z localhost:2181(on each machine that has > >> >zookeeper as well) > >> > > >> > > >> > > >> >I followed the wizard (on each machine) to create 2 shards on 2 ports > and > >> 2 > >> >replicas. For the first machine I created "test" collection, but for > the > >> >second one I just reused the same collection. Now, Solr works on both > >> >machines but the issue is that when I see Solr admin page, it shows all > >> the > >> >shards and replicas of the collection on ONE MACHINE. > >> > > >> > > >> >Any ideas why I am facing these issues? > >> > > >> > > >> >Regards, > >> > > >> >Salman > >> > > >> >On Sun, Nov 29, 2015 at 10:07 PM, Erick Erickson < > erickerick...@gmail.com > >> > > >> >wrote: > >> > > >> >> 1> I'll pass > >> >> > >> >> 2a> yes. > >> >> 2b> This should be automatic when you create the collection. You > >> >> should specify numShards=2, replicationFactor=2 and > >> >> maxShardsPerNode=2. Solr tries hard to distribute the shards and > >> >> replicas on different machines. > >> >> > >> >> If you _really_ require exact placement, you can specify > createNodeSet > >> >> which will assign shards round-robin to the specified list or even > >> >> EMPTY which will create no actual cores at all. In this latter case > >> >> you could then use ADDREPLICA to place each shard and replica exactly > >> >> where you want it to go. > >> >> > >> >> But I wouldn't bother first, just do what I outlined in 2b and it > >> >> should be fine. > >> >> > >> >> Best, > >> >> Erick > >> >> > >> >> On Sat, Nov 28, 2015 at 1:03 PM, Salman Ansari < > salman.rah...@gmail.com > >> > > >> >> wrote: > >> >> > I have started with one Zookeeper to test things and I have the > >> following > >> >> > questions > >> >> > > >> >> > 1) In my zoo.cfg I have defined > >> >> > tickTime=4000 > >> >> > dataDir=C:\\Solr\\Zookeeper\\zookeeper-3.4.6\\data > >> >> > clientPort=2183 > >> >> > > >> >> > the strange thing is that it picks up dataDir and clientPort but > >> always > >> >> > keeps tickTime = 3000. Any idea why? > >> >> > > >> >> > 2) It is clear from the documentation how to create an ensemble of > >> >> > Zookeepers on 3 machines but what I am not sure about is how to > >> >> > a) Setup actual Solr on 2 machines (is it just installing > Solr > >> on > >> >> > each server and then passing the same zookeeper ensemble)? > >> >> > b) How to (using Solr Cloud) create 2 shards spread on 2 > >> machines > >> >> > with each machine having a replica of the other for high > >> availability. So > >> >> > server1 will have shard1 and replica2 and server2 will have shard2 > and > >> >> > replica1? > >> >> > > >> >> > Comments and feedback are appreciated. > >> >> > > >> >> > Regards, > >> >> > Salman > >> >> > > >> >> > > >> >> > On Fri, Nov 27, 2015 at 5:52 AM, Zheng Lin Edwin Yeo < > >> >> edwinye...@gmail.com> > >> >> > wrote: > >> >> > > >> >> >> Yes, the ZooKeeper is Windows compatible. > >> >> >> > >> >> >> You can follow the guide, just need to replace the Linux commands > >> with > >> >> the > >>
Re: Setting up Solr on multiple machines
I have started with one Zookeeper to test things and I have the following questions 1) In my zoo.cfg I have defined tickTime=4000 dataDir=C:\\Solr\\Zookeeper\\zookeeper-3.4.6\\data clientPort=2183 the strange thing is that it picks up dataDir and clientPort but always keeps tickTime = 3000. Any idea why? 2) It is clear from the documentation how to create an ensemble of Zookeepers on 3 machines but what I am not sure about is how to a) Setup actual Solr on 2 machines (is it just installing Solr on each server and then passing the same zookeeper ensemble)? b) How to (using Solr Cloud) create 2 shards spread on 2 machines with each machine having a replica of the other for high availability. So server1 will have shard1 and replica2 and server2 will have shard2 and replica1? Comments and feedback are appreciated. Regards, Salman On Fri, Nov 27, 2015 at 5:52 AM, Zheng Lin Edwin Yeowrote: > Yes, the ZooKeeper is Windows compatible. > > You can follow the guide, just need to replace the Linux commands with the > Windows commands and paths > > Regards, > Edwin > > > On 26 November 2015 at 20:56, Alessandro Benedetti > wrote: > > > I think it should be straightforward following the Solr wiki : > > > > > > > https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble > > > > I never played much in details with zookeeper ( never tried on a windows > > machine), but I assume it is windows compatible ( I can see binaries > .cmd ) > > > > Cheers > > > > On 26 November 2015 at 12:38, Salman Ansari > > wrote: > > > > > Hi, > > > > > > I have seen the guide of setting up Solr on one machine as well as > > setting > > > it up on multiple machines on Liunx. Is there a good guide of how to > > setup > > > Solr on multiple machines on Windows Server with Zookeeper ensemble? My > > > structure is as follows > > > > > > 1) 3 machines will have Zookeeper to create an ensemble > > > 2) 2 of these machines will have Solr installed (with each having a > > replica > > > of other to provide high availability) > > > > > > Any link/article that provides such a guide? > > > > > > Regards, > > > Salman > > > > > > > > > > > -- > > -- > > > > Benedetti Alessandro > > Visiting card : http://about.me/alessandro_benedetti > > > > "Tyger, tyger burning bright > > In the forests of the night, > > What immortal hand or eye > > Could frame thy fearful symmetry?" > > > > William Blake - Songs of Experience -1794 England > > >
Re: Setting up Solr on multiple machines
Yes, the ZooKeeper is Windows compatible. You can follow the guide, just need to replace the Linux commands with the Windows commands and paths Regards, Edwin On 26 November 2015 at 20:56, Alessandro Benedettiwrote: > I think it should be straightforward following the Solr wiki : > > > https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble > > I never played much in details with zookeeper ( never tried on a windows > machine), but I assume it is windows compatible ( I can see binaries .cmd ) > > Cheers > > On 26 November 2015 at 12:38, Salman Ansari > wrote: > > > Hi, > > > > I have seen the guide of setting up Solr on one machine as well as > setting > > it up on multiple machines on Liunx. Is there a good guide of how to > setup > > Solr on multiple machines on Windows Server with Zookeeper ensemble? My > > structure is as follows > > > > 1) 3 machines will have Zookeeper to create an ensemble > > 2) 2 of these machines will have Solr installed (with each having a > replica > > of other to provide high availability) > > > > Any link/article that provides such a guide? > > > > Regards, > > Salman > > > > > > -- > -- > > Benedetti Alessandro > Visiting card : http://about.me/alessandro_benedetti > > "Tyger, tyger burning bright > In the forests of the night, > What immortal hand or eye > Could frame thy fearful symmetry?" > > William Blake - Songs of Experience -1794 England >
Setting up Solr on multiple machines
Hi, I have seen the guide of setting up Solr on one machine as well as setting it up on multiple machines on Liunx. Is there a good guide of how to setup Solr on multiple machines on Windows Server with Zookeeper ensemble? My structure is as follows 1) 3 machines will have Zookeeper to create an ensemble 2) 2 of these machines will have Solr installed (with each having a replica of other to provide high availability) Any link/article that provides such a guide? Regards, Salman
Re: Setting up Solr on multiple machines
I think it should be straightforward following the Solr wiki : https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble I never played much in details with zookeeper ( never tried on a windows machine), but I assume it is windows compatible ( I can see binaries .cmd ) Cheers On 26 November 2015 at 12:38, Salman Ansariwrote: > Hi, > > I have seen the guide of setting up Solr on one machine as well as setting > it up on multiple machines on Liunx. Is there a good guide of how to setup > Solr on multiple machines on Windows Server with Zookeeper ensemble? My > structure is as follows > > 1) 3 machines will have Zookeeper to create an ensemble > 2) 2 of these machines will have Solr installed (with each having a replica > of other to provide high availability) > > Any link/article that provides such a guide? > > Regards, > Salman > -- -- Benedetti Alessandro Visiting card : http://about.me/alessandro_benedetti "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England