How to restart solr in docker?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

How to restart solr in docker?

christinebuckler
What is the command for restarting solr on a docker image? I have modified the solrconfig.xml to add the suggest plugin and now I want to update to reflect this change. I was able to stop solr using “$ docker exec -it my_solr stop all” but now I can’t figure out how to restart.

Thanks,
Christine Buckler

Reply | Threaded
Open this post in threaded view
|

Re: How to restart solr in docker?

Jamie Jackson
The usual procedure with containers is to restart or recreate the container.

On Fri, Dec 15, 2017 at 11:55 AM, Buckler, Christine <
[hidden email]> wrote:

> What is the command for restarting solr on a docker image? I have modified
> the solrconfig.xml to add the suggest plugin and now I want to update to
> reflect this change. I was able to stop solr using “$ docker exec -it
> my_solr stop all” but now I can’t figure out how to restart.
>
> Thanks,
> Christine Buckler
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How to restart solr in docker?

Shawn Heisey-2
In reply to this post by christinebuckler
On 12/15/2017 9:55 AM, Buckler, Christine wrote:
> What is the command for restarting solr on a docker image? I have modified the solrconfig.xml to add the suggest plugin and now I want to update to reflect this change. I was able to stop solr using “$ docker exec -it my_solr stop all” but now I can’t figure out how to restart.

You would need to ask whoever created the docker image.  There are no
docker images produced by the Solr project.

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|

Re: How to restart solr in docker?

Deepak Vohra-2
In reply to this post by christinebuckler
Is the Docker container still running, which may be listed with docker ps?

Solr may be started with:

docker exec -it my_solr start



--------------------------------------------
On Fri, 12/15/17, Buckler, Christine <[hidden email]> wrote:

 Subject: How to restart solr in docker?
 To: "[hidden email]" <[hidden email]>
 Received: Friday, December 15, 2017, 8:55 AM
 
 What is the command for restarting solr on a
 docker image? I have modified the solrconfig.xml to add the
 suggest plugin and now I want to update to reflect this
 change. I was able to stop solr using “$ docker exec -it
 my_solr stop all” but now I can’t figure out how to
 restart.
 
 Thanks,
 Christine Buckler
 
 
Reply | Threaded
Open this post in threaded view
|

Re: How to restart solr in docker?

alexpusch
In reply to this post by christinebuckler
While I don't know what exact solr image you use I can tell you this:

1. The command of your dockerfile probably starts solr. A Docker container
will automatically shutdown if the process that was started by it's command
is killed. Meaning you should never 'restart' a process in a container, but
restart the container as a whole.
2. You need to make sure your solrconfig.xml is under a docker volume of
some kind. If it is not, your changes will not take effect since after the
container restart the solrconfig.xml will revert to the version that is in
the image.




--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: How to restart solr in docker?

christinebuckler
That makes sense. I am trying to add the “Suggest” plugin so I modified the solrconfig.xml file. Is there a better way to do what I am trying to do? I have not been able to add the plugin successfully. Do you have a resource page that shows how to add the config file under a volume?

On 12/16/17, 3:17 AM, "alexpusch" <[hidden email]> wrote:

    While I don't know what exact solr image you use I can tell you this:
   
    1. The command of your dockerfile probably starts solr. A Docker container
    will automatically shutdown if the process that was started by it's command
    is killed. Meaning you should never 'restart' a process in a container, but
    restart the container as a whole.
    2. You need to make sure your solrconfig.xml is under a docker volume of
    some kind. If it is not, your changes will not take effect since after the
    container restart the solrconfig.xml will revert to the version that is in
    the image.
   
   
   
   
    --
    Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
   

Reply | Threaded
Open this post in threaded view
|

Re: How to restart solr in docker?

Rick Leir-2
Christine
Have a look at the API
Lucene.apache.org/solr/guide/6_6/config-api.html
(Choose whatever version of the doc that is appropriate)
Various parts of solrconfig can be overlayed.

Or do your debugging with a normally installed Solr, then dockerize.
Cheers -- Rick


On December 18, 2017 12:28:25 PM EST, "Buckler, Christine" <[hidden email]> wrote:

>That makes sense. I am trying to add the “Suggest” plugin so I modified
>the solrconfig.xml file. Is there a better way to do what I am trying
>to do? I have not been able to add the plugin successfully. Do you have
>a resource page that shows how to add the config file under a volume?
>
>On 12/16/17, 3:17 AM, "alexpusch" <[hidden email]> wrote:
>
>  While I don't know what exact solr image you use I can tell you this:
>    
>1. The command of your dockerfile probably starts solr. A Docker
>container
>will automatically shutdown if the process that was started by it's
>command
>is killed. Meaning you should never 'restart' a process in a container,
>but
>    restart the container as a whole.
>2. You need to make sure your solrconfig.xml is under a docker volume
>of
>some kind. If it is not, your changes will not take effect since after
>the
>container restart the solrconfig.xml will revert to the version that is
>in
>    the image.
>    
>    
>    
>    
>    --
>   Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>    

--
Sorry for being brief. Alternate email is rickleir at yahoo dot com
Reply | Threaded
Open this post in threaded view
|

Re: How to restart solr in docker?

reznov9185
In reply to this post by christinebuckler
This is what I needed to do for updating the solrconfig files from local to
docker:
`sudo docker cp docker/solr/production/conf/solrconfig.xml
solr:/opt/solr/server/solr/production/conf/solrconfig.xml`
`sudo docker restart solr`
For some reason this is not syncing automatically, so I had to cp the
changed configs.




--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html