[ 
https://issues.apache.org/jira/browse/SOLR-11527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16214581#comment-16214581
 ] 

Shawn Heisey commented on SOLR-11527:
-------------------------------------

In situations where a user installs the Solr service to a *NIX system with gnu 
tools, running bin/solr start directly (instead of starting the service) will 
result in very different behavior than the user likely expects.

I think that the start script should detect when Solr has been installed as a 
service.  When that status is detected, ut should output a warning if started 
in the "manual" way.

To do this, the service installer script should create a file with a name like 
"install.params" in the install directory (default /opt/solr).  The init script 
should set an environment variable, something like SOLR_STARTED_FROM_INIT.  I 
can envision a scenario where a later service install could utilize information 
in the install.params file.

If consensus says that the filename and environment variable name are terrible, 
feel free to bikeshed.

If the bin/solr script finds the install.params file, and does NOT find the 
SOLR_STARTED_FROM_INIT variable, it should output a warning that says something 
like this:

{code}
=== WARNING ===
Solr has been installed as a service.  This script execution is taking place 
*outside* of the service.  Solr should be started with the service command or 
the init script, not run directly from the install directory.
===============
{code}


> The Solr start script should detect service install and recommend NOT calling 
> script directly
> ---------------------------------------------------------------------------------------------
>
>                 Key: SOLR-11527
>                 URL: https://issues.apache.org/jira/browse/SOLR-11527
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: scripts and tools
>    Affects Versions: 7.1.0
>            Reporter: Shawn Heisey
>            Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to