Re: Stopping Solr on Linux when run as a service
Steve, In short, don't worry: it all gets taken care of. The way services work on Linux is, when the system shuts down it will basically call "service (servicname) stop" on each service. That calls the bin/init.d/solr script with a "stop" argument, which in turn calls the bin/solr script with a "stop" argument (I'm referring to where the files are in the distribution, not where they get installed). k/r, Scott On Tue, Nov 10, 2015 at 9:40 AM, Steven White wrote: > Hi folks, > > This question maybe more of a Linux one vs. Solr, but I have to start > someplace. > > I'm reading this link > https://cwiki.apache.org/confluence/display/solr/Taking+Solr+to+Production > to get Solr on Linux (I'm more of a Windows guy). > > The page provides good intro on how to setup Solr to start as a service on > Linux. Now what I don't get is this: what happens when the system is > shutting down? How does Solr knows to shutdown gracefully when there is > noting on that page talks about issuing a "stop" command on system > shutdown? Can someone shed some light on this? Like I said, I'm more of a > "Windows" guy. > > Thanks in advanced!! > > Steve > -- Scott Stults | Founder & Solutions Architect | OpenSource Connections, LLC | 434.409.2780 http://www.opensourceconnections.com
Re: Stopping Solr on Linux when run as a service
On 11/10/2015 7:40 AM, Steven White wrote: > This question maybe more of a Linux one vs. Solr, but I have to start > someplace. > > I'm reading this link > https://cwiki.apache.org/confluence/display/solr/Taking+Solr+to+Production > to get Solr on Linux (I'm more of a Windows guy). > > The page provides good intro on how to setup Solr to start as a service on > Linux. Now what I don't get is this: what happens when the system is > shutting down? How does Solr knows to shutdown gracefully when there is > noting on that page talks about issuing a "stop" command on system > shutdown? Can someone shed some light on this? Like I said, I'm more of a > "Windows" guy. This definitely applies more to Linux than Solr. Understanding the answer requires understanding basic Linux system design and administration. Linux systems use something, usually sysvinit, systemd, or upstart, to manage service startup and shutdown. I will not go into detail, but one of the things that these programs do is manage services via symlinks into the /etc/init.d structure -- starting them at boot time and shutting them down when the OS is shutting down. When you use the Solr installer script, you get a script in /etc/init.d and symlinks for startup and shutdown, so the system has the ability to ask Solr to turn itself off. If programs do not shut themselves down fast enough at shutdown time, the operating system will attempt to hard kill them before it shuts itself off ... but even if they don't die, Linux can still forcibly halt itself and turn off the power. Thanks, Shawn
Stopping Solr on Linux when run as a service
Hi folks, This question maybe more of a Linux one vs. Solr, but I have to start someplace. I'm reading this link https://cwiki.apache.org/confluence/display/solr/Taking+Solr+to+Production to get Solr on Linux (I'm more of a Windows guy). The page provides good intro on how to setup Solr to start as a service on Linux. Now what I don't get is this: what happens when the system is shutting down? How does Solr knows to shutdown gracefully when there is noting on that page talks about issuing a "stop" command on system shutdown? Can someone shed some light on this? Like I said, I'm more of a "Windows" guy. Thanks in advanced!! Steve