su - solr -c "/opt/solr/bin/solr create -c statdx -d /home/john/conf
-shards 1 -replicationFactor 2"

However, this won't work by itself.  There is some preparation
necessary...  I'll send you the doc.

On Thu, Apr 14, 2016 at 4:55 PM, Jay Potharaju <jspothar...@gmail.com>
wrote:

> Curious what command did you use?
>
> On Thu, Apr 14, 2016 at 3:48 PM, John Bickerstaff <
> j...@johnbickerstaff.com>
> wrote:
>
> > I had a hard time getting replicas made via the API, once I had created
> the
> > collection for the first time.... although that may have been ignorance
> on
> > my part.
> >
> > I was able to get it done fairly easily on the Linux command line.  If
> > that's an option and you're interested, let me know - I have a rough but
> > accurate document. But perhaps others on the list will have the specific
> > answer you're looking for.
> >
> > On Thu, Apr 14, 2016 at 4:19 PM, Jay Potharaju <jspothar...@gmail.com>
> > wrote:
> >
> > > Hi,
> > > I am using solr 5.5 and testing adding a new replica when a solr
> instance
> > > comes up. When I run the following command I get an error. I have 1
> > replica
> > > and trying to add another replica.
> > >
> > >
> > >
> >
> http://x.x.x.x:8984/solr/admin/collections?action=ADDREPLICA&collection=test2&shard=shard1&node=x.x.x.x:9001_solr
> > >
> > > Error:
> > > > <str name="Operation addreplica caused
> > > >
> > >
> >
> exception:">org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
> > > > At least one of the node(s) specified are not currently active, no
> > action
> > > > taken.</str>
> > > > <lst name="exception">
> > > > <str name="msg">At least one of the node(s) specified are not
> currently
> > > > active, no action taken.</str>
> > > > <int name="rspCode">400</int>
> > > > </lst>
> > > > <lst name="error">
> > > > <lst name="metadata">
> > > > <str name="error-class">org.apache.solr.common.SolrException</str>
> > > > <str
> name="root-error-class">org.apache.solr.common.SolrException</str>
> > > > </lst>
> > > > <str name="msg">At least one of the node(s) specified are not
> currently
> > > > active, no action taken.</str>
> > > > <int name="code">400</int>
> > > > </lst>
> > > > </response>
> > >
> > >
> > > But when i create a new collection with 2 replicas it works fine.
> > > As a side note my clusterstate.json is not updating correctly. Not sure
> > if
> > > that is causing an issue.
> > >
> > >  Any suggestions why the Addreplica command is not working. And is it
> > > related to the clusterstate.json? If yes, how can i fix it?
> > >
> > > --
> > > Thanks
> > > Jay
> > >
> >
>
>
>
> --
> Thanks
> Jay Potharaju
>

Reply via email to