Thanks Eric. I have a scenario whereby I will like to setup a minimal 1 shard with 3 replica all of which each replica sits in its one machine. I also have an external ZK ensemble setup with zk1, zk2 and zk3.
A simple example: I create say collection1 in the following order to satisfy the scenario above using just solr.cmd. (note I am using a windows server do perform the below as this is a requirement) 1. Create collection1 with numshards of 1 and with port 5000 which points to say example/cloud/node1/solr 2. Next create the replica for collection1 (without specifying numshards this time as it will tell Solr to create a replica) with port 5001 which points to say example/cloud/node2/solr 3. Repeat step 2 and point this to say example/cloud/node3/solr with port 5002 I am currently stuck at Step 1 as I only managed to create the collection with Shard 1 pointing at port 5000. However, how can I go about creating the replica for that existing collection, collection1? Best regards, Adrian -----Original Message----- From: Erick Erickson [mailto:erickerick...@gmail.com] Sent: Tuesday, July 7, 2015 1:25 AM To: solr-user@lucene.apache.org Subject: Re: Setup Solr Multiserver Environment How are you starting this? WARNING: I haven't worked on a windows box for some time so beware my advice ;). You shouldn't have to edit these at all if you're using the start scripts (now preferred). -h host -p port -s dir All this does is set an env variable that gets substituted in for things like ${jetty.port:5002}. That syntax really says "Use the env var 'jetty.port' if it's defined, otherwise default to 5002" Try bin/solr.cmd --help and see what the options are.. Best, Erick On Mon, Jul 6, 2015 at 1:41 AM, Adrian Liew <adrian.l...@avanade.com> wrote: > Has anyone tried setting up a multiserver environment for Solr on a Windows > machine? > > I was just wondering how you will go about say setting up a single shard with > 3 replicas (one of them is the leader) using the solr.cmd or infact java.cmd > on three different virtual machines for example. Note, I can only run > solr.cmd on Windows Machine. I won't be able to use shell scripting using the > sh command if I wanted to have an automated script to startup. > > This is the way I see it for SolrCloud scenario: > > 1 replica = 1 machine > > So for a three server instance/node setup with a single shard, it will be: > > Shard 1: > Replica 1 (this is the Leader for the shard for example) : > solrnode1.cloudapp.net:5000 Replica 2: solrnode1.cloudapp.net:5001 > Replica 3: solrnode1.cloudapp.net:5002 > > May it be possible to go about changing the hostport in the solr.xml of each > of those solr server instance/nodes above? So like each of them will be > pointing to like a directory called solr/node1, solr/node2 and solr/node3. So > the only place which makes sense to configure the host addresses is modifying > the sections below: > > The default section that comes with the solr.xml is within solrcloud section > is: > > <str name="host">${host:}</str> > <int name="hostPort">${jetty.port:8983}</int> > <str name="hostContext">${hostContext:solr}</str> > > So in my case for example, can I do the following? > > Replica 1: > <str name="host">solrnode1.cloudapp.net</str> > <int name="hostPort">${jetty.port:5000}</int> > <str name="hostContext">${hostContext:solr}</str> > > Replica 2: > <str name="host"> solrnode1.cloudapp.net </str> > <int name="hostPort">${jetty.port:5001}</int> > <str name="hostContext">${hostContext:solr}</str> > > Replica 3: > <str name="host"> solrnode1.cloudapp.net </str> > <int name="hostPort">${jetty.port:5002}</int> > <str name="hostContext">${hostContext:solr}</str> > > Any suggestions are welcomed. > > Regards, > Adrian > > > Best regards, > > Adrian Liew | Consultant Application Developer Avanade Malaysia Sdn. > Bhd..| Consulting Services > (: Direct: +(603) 2382 5668 > È: +6010-2288030 > >