You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by jimtronic <ji...@gmail.com> on 2013/03/28 17:05:45 UTC
bootstrap_conf without restarting
I'm doing fairly frequent changes to my data-config.xml files on some of my
cores in a solr cloud setup. Is there anyway to to get these files active
and up to Zookeeper without restarting the instance?
I've noticed that if I just launch another instance of solr with the
bootstrap_conf flag set to true, it uploads the new settings, but it dies
because there's already a solr instance running on that port. It also seems
to make the original one unresponsive or at least "down" in zookeeper's
eyes. I then just restart that instance and everything is back up. It'd be
nice if I could bootstrap without actually starting solr.
What's the best practice for deploying changes to data-config.xml?
Thanks, Jim
--
View this message in context: http://lucene.472066.n3.nabble.com/bootstrap-conf-without-restarting-tp4052092.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: bootstrap_conf without restarting
Posted by Timothy Potter <th...@gmail.com>.
I do this frequently, but use the scripts provided in cloud-scripts, e.g.
export ZK_HOST=...
cloud-scripts/zkcli.sh -zkhost $ZK_HOST -cmd upconfig -confdir
$COLLECTION_INSTANCE_DIR/conf -confname $COLLECTION_NAME
Also, once you do this, you still have to reload the collection so that it
picks up the change:
curl -i -v "
http://URL/solr/admin/collections?action=RELOAD&name=COLLECTION_NAME"
On Thu, Mar 28, 2013 at 1:03 PM, Mark Miller <ma...@gmail.com> wrote:
> Couple notes though:
>
> > java -classpath example/solr-webapp/WEB-INF/lib/*
> > org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 127.0.0.1:9983
> > -confdir example/solr/collection1/conf -confname conf1 -solrhome
> > example/solr
>
> I don't think you want that -solrhome - if I remember right, thats for
> testing/local purposes and is just for when you want to run zk internally
> from the cmd. Generally that should be ignored. I think you also might want
> to put the -classpath value in quotes, or your OS can do some auto
> expanding that causes issues…so I think it might be better to do like:
>
> > java -classpath "example/solr-webapp/WEB-INF/lib/*"
> > org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 127.0.0.1:9983
> > -confdir example/solr/collection1/conf -confname conf1
>
> I think the examples on the wiki should probably be updated. -solrhome is
> only needed with the bootstrap option I believe.
>
> - Mark
>
> On Mar 28, 2013, at 1:14 PM, Joel Bernstein <jo...@gmail.com> wrote:
>
> > You can use the upconfig command witch is described on the Solr Cloud
> wiki
> > page, followed by a collection reload also described on the wiki. Here
> is a
> > sample command upconfig:
> >
> > java -classpath example/solr-webapp/WEB-INF/lib/*
> > org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 127.0.0.1:9983
> > -confdir example/solr/collection1/conf -confname conf1 -solrhome
> > example/solr
> >
> >
> >
> >
> > On Thu, Mar 28, 2013 at 12:05 PM, jimtronic <ji...@gmail.com> wrote:
> >
> >> I'm doing fairly frequent changes to my data-config.xml files on some
> of my
> >> cores in a solr cloud setup. Is there anyway to to get these files
> active
> >> and up to Zookeeper without restarting the instance?
> >>
> >> I've noticed that if I just launch another instance of solr with the
> >> bootstrap_conf flag set to true, it uploads the new settings, but it
> dies
> >> because there's already a solr instance running on that port. It also
> seems
> >> to make the original one unresponsive or at least "down" in zookeeper's
> >> eyes. I then just restart that instance and everything is back up. It'd
> be
> >> nice if I could bootstrap without actually starting solr.
> >>
> >> What's the best practice for deploying changes to data-config.xml?
> >>
> >> Thanks, Jim
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://lucene.472066.n3.nabble.com/bootstrap-conf-without-restarting-tp4052092.html
> >> Sent from the Solr - User mailing list archive at Nabble.com.
> >>
> >
> >
> >
> > --
> > Joel Bernstein
> > Professional Services LucidWorks
>
>
Re: bootstrap_conf without restarting
Posted by Mark Miller <ma...@gmail.com>.
Couple notes though:
> java -classpath example/solr-webapp/WEB-INF/lib/*
> org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 127.0.0.1:9983
> -confdir example/solr/collection1/conf -confname conf1 -solrhome
> example/solr
I don't think you want that -solrhome - if I remember right, thats for testing/local purposes and is just for when you want to run zk internally from the cmd. Generally that should be ignored. I think you also might want to put the -classpath value in quotes, or your OS can do some auto expanding that causes issues…so I think it might be better to do like:
> java -classpath "example/solr-webapp/WEB-INF/lib/*"
> org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 127.0.0.1:9983
> -confdir example/solr/collection1/conf -confname conf1
I think the examples on the wiki should probably be updated. -solrhome is only needed with the bootstrap option I believe.
- Mark
On Mar 28, 2013, at 1:14 PM, Joel Bernstein <jo...@gmail.com> wrote:
> You can use the upconfig command witch is described on the Solr Cloud wiki
> page, followed by a collection reload also described on the wiki. Here is a
> sample command upconfig:
>
> java -classpath example/solr-webapp/WEB-INF/lib/*
> org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 127.0.0.1:9983
> -confdir example/solr/collection1/conf -confname conf1 -solrhome
> example/solr
>
>
>
>
> On Thu, Mar 28, 2013 at 12:05 PM, jimtronic <ji...@gmail.com> wrote:
>
>> I'm doing fairly frequent changes to my data-config.xml files on some of my
>> cores in a solr cloud setup. Is there anyway to to get these files active
>> and up to Zookeeper without restarting the instance?
>>
>> I've noticed that if I just launch another instance of solr with the
>> bootstrap_conf flag set to true, it uploads the new settings, but it dies
>> because there's already a solr instance running on that port. It also seems
>> to make the original one unresponsive or at least "down" in zookeeper's
>> eyes. I then just restart that instance and everything is back up. It'd be
>> nice if I could bootstrap without actually starting solr.
>>
>> What's the best practice for deploying changes to data-config.xml?
>>
>> Thanks, Jim
>>
>>
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/bootstrap-conf-without-restarting-tp4052092.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>
>
>
> --
> Joel Bernstein
> Professional Services LucidWorks
Re: bootstrap_conf without restarting
Posted by Joel Bernstein <jo...@gmail.com>.
You can use the upconfig command witch is described on the Solr Cloud wiki
page, followed by a collection reload also described on the wiki. Here is a
sample command upconfig:
java -classpath example/solr-webapp/WEB-INF/lib/*
org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 127.0.0.1:9983
-confdir example/solr/collection1/conf -confname conf1 -solrhome
example/solr
On Thu, Mar 28, 2013 at 12:05 PM, jimtronic <ji...@gmail.com> wrote:
> I'm doing fairly frequent changes to my data-config.xml files on some of my
> cores in a solr cloud setup. Is there anyway to to get these files active
> and up to Zookeeper without restarting the instance?
>
> I've noticed that if I just launch another instance of solr with the
> bootstrap_conf flag set to true, it uploads the new settings, but it dies
> because there's already a solr instance running on that port. It also seems
> to make the original one unresponsive or at least "down" in zookeeper's
> eyes. I then just restart that instance and everything is back up. It'd be
> nice if I could bootstrap without actually starting solr.
>
> What's the best practice for deploying changes to data-config.xml?
>
> Thanks, Jim
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/bootstrap-conf-without-restarting-tp4052092.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
--
Joel Bernstein
Professional Services LucidWorks