Discussion:
Closing Windows CMD kills Solr
Steven White
2015-10-29 00:12:47 UTC
Permalink
Hi Folks,

I don't understand if this is an expected behavior or not.

On Windows, I start Solr from a command prompt like so:

bin\solr start -p 8983 -s C:\MySolrIndex

Now, once I close the command prompt the Java process that started Solr is
killed. is this expected? How do I keep Solr alive when I close the
command prompt?

This dose not happen on Linux.

Thank in advanced.

Steve
Routley, Alan
2015-10-29 08:25:26 UTC
Permalink
Hi Steve,

This is expected behaviour.

I get around this by creating a scheduled task, set to run at startup to start Solr.

Hope this helps

Alan

-----Original Message-----
From: Steven White [mailto:***@gmail.com]
Sent: 29 October 2015 00:13
To: solr-***@lucene.apache.org
Subject: Closing Windows CMD kills Solr

Hi Folks,

I don't understand if this is an expected behavior or not.

On Windows, I start Solr from a command prompt like so:

bin\solr start -p 8983 -s C:\MySolrIndex

Now, once I close the command prompt the Java process that started Solr is killed. is this expected? How do I keep Solr alive when I close the command prompt?

This dose not happen on Linux.

Thank in advanced.

Steve


******************************************************************************************************************
Experience the British Library online at www.bl.uk<http://www.bl.uk/>
The British Library’s latest Annual Report and Accounts : www.bl.uk/aboutus/annrep/index.html<http://www.bl.uk/aboutus/annrep/index.html>
Help the British Library conserve the world's knowledge. Adopt a Book. www.bl.uk/adoptabook<http://www.bl.uk/adoptabook>
The Library's St Pancras site is WiFi - enabled
*****************************************************************************************************************
The information contained in this e-mail is confidential and may be legally privileged. It is intended for the addressee(s) only. If you are not the intended recipient, please delete this e-mail and notify the ***@bl.uk<mailto:***@bl.uk> : The contents of this e-mail must not be disclosed or copied without the sender's consent.
The statements and opinions expressed in this message are those of the author and do not necessarily reflect those of the British Library. The British Library does not take any responsibility for the views of the author.
*****************************************************************************************************************
T
Charlie Hull
2015-10-29 09:22:07 UTC
Permalink
Post by Steven White
Hi Folks,
I don't understand if this is an expected behavior or not.
bin\solr start -p 8983 -s C:\MySolrIndex
Now, once I close the command prompt the Java process that started Solr is
killed. is this expected? How do I keep Solr alive when I close the
command prompt?
This dose not happen on Linux.
Thank in advanced.
Steve
Yes, this is expected behaviour. If you want to prevent it you either
need to keep the command window open, or run Solr as a Windows Service
(kinda like a Unix daemon, but more annoying). To do the latter I would
recommend NSSM - here are some links that will help:
http://mikerobbins.co.uk/2014/11/07/install-solr-as-windows-service-for-sitecore-content-search/
(from step 2)
http://www.norconex.com/how-to-run-solr5-as-a-service-on-windows/

HTH

Charlie
--
Charlie Hull
Flax - Open Source Enterprise Search

tel/fax: +44 (0)8700 118334
mobile: +44 (0)7767 825828
web: www.flax.co.uk
Zheng Lin Edwin Yeo
2015-10-29 10:03:16 UTC
Permalink
Yes, this is the expected behaviour. Once you close the command window,
Solr will stop running. This has happened to me several times. Just to
check, which version of Solr are you using?

I have tried NSSM before, and it works for Solr 5.0 and Solr 5.1. However,
when I move up to Solr 5.3.0, I wasn't able to use the same method to start
it as a service using NSSM.

Do let me know if you managed to set up NSSM for Solr 5.3.0?

Regards,
Edwin
Post by Charlie Hull
Post by Steven White
Hi Folks,
I don't understand if this is an expected behavior or not.
bin\solr start -p 8983 -s C:\MySolrIndex
Now, once I close the command prompt the Java process that started Solr is
killed. is this expected? How do I keep Solr alive when I close the
command prompt?
This dose not happen on Linux.
Thank in advanced.
Steve
Yes, this is expected behaviour. If you want to prevent it you either
need to keep the command window open, or run Solr as a Windows Service
(kinda like a Unix daemon, but more annoying). To do the latter I would
http://mikerobbins.co.uk/2014/11/07/install-solr-as-windows-service-for-sitecore-content-search/
(from step 2)
http://www.norconex.com/how-to-run-solr5-as-a-service-on-windows/
HTH
Charlie
--
Charlie Hull
Flax - Open Source Enterprise Search
tel/fax: +44 (0)8700 118334
mobile: +44 (0)7767 825828
web: www.flax.co.uk
Timothy Potter
2015-10-29 22:40:28 UTC
Permalink
would launching the java process with javaw help here?

On Thu, Oct 29, 2015 at 4:03 AM, Zheng Lin Edwin Yeo
Post by Zheng Lin Edwin Yeo
Yes, this is the expected behaviour. Once you close the command window,
Solr will stop running. This has happened to me several times. Just to
check, which version of Solr are you using?
I have tried NSSM before, and it works for Solr 5.0 and Solr 5.1. However,
when I move up to Solr 5.3.0, I wasn't able to use the same method to start
it as a service using NSSM.
Do let me know if you managed to set up NSSM for Solr 5.3.0?
Regards,
Edwin
Post by Charlie Hull
Post by Steven White
Hi Folks,
I don't understand if this is an expected behavior or not.
bin\solr start -p 8983 -s C:\MySolrIndex
Now, once I close the command prompt the Java process that started Solr is
killed. is this expected? How do I keep Solr alive when I close the
command prompt?
This dose not happen on Linux.
Thank in advanced.
Steve
Yes, this is expected behaviour. If you want to prevent it you either
need to keep the command window open, or run Solr as a Windows Service
(kinda like a Unix daemon, but more annoying). To do the latter I would
http://mikerobbins.co.uk/2014/11/07/install-solr-as-windows-service-for-sitecore-content-search/
(from step 2)
http://www.norconex.com/how-to-run-solr5-as-a-service-on-windows/
HTH
Charlie
--
Charlie Hull
Flax - Open Source Enterprise Search
tel/fax: +44 (0)8700 118334
mobile: +44 (0)7767 825828
web: www.flax.co.uk
Loading...