[ 
https://issues.apache.org/jira/browse/SOLR-16254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sun Rui updated SOLR-16254:
---------------------------
    Description: 
There is a statement in the help message for "bin/solr create_core":

_*When a configSet is used, this can be run from remote (non-Solr) hosts.  If 
pointing at a non-configSet directory, this must be run from the host that you 
wish to create the core on.*_

However, this is not case.

Suppose there is a solr server instance launched at 192.168.0.100:8983. On a 
different host (non-solr host), use the following command to create a new core:

SOLR_HOST=192.168.0.100 bin/solr create_core -c test -d _default -p 8983

an error message is output like the following:

ERROR: Error CREATEing SolrCore 'test': Unable to create core [test] Caused by: 
Can't find resource 'solrconfig.xml' in classpath or '/var/solr/data/test'

check the core status:

$ curl [http://192.168.0.100:8983/solr/admin/cores]
{
  "responseHeader":

{     "status":0,     "QTime":0}

,
  
"initFailures":\{"test":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
 Could not load conf for core test: Error loading solr config from 
/opt/solr-9.0.0/server/solr/test/conf/solrconfig.xml"},
  "status":{}}

You can see that the core was created but can't be loaded by the solr server 
(because of no configuration files can be found in the conf sub-directory of 
the instance directory).

As a comparison, we can remotely create a new core using the following Solr API:

curl 
"http://192.168.0.100:8983/solr/admin/cores?action=CREATE&name=test&instanceDir=test&configSet=_default";

 

My question is how to fix this issue. Do we want to fixup the statement to 
match the real behavior or update the create_core tool to support remotely 
creating a core ?

  was:
There is a statement in the help message for "bin/solr create_core":

_*When a configSet is used, this can be run from remote (non-Solr) hosts.  If 
pointing at a non-configSet directory, this must be run from the host that you 
wish to create the core on.*_

However, this is not case.

Suppose there is a solr server instance launched at 192.168.0.100:8983. On a 
different host (non-solr host), use the following command to create a new core:

SOLR_HOST=192.168.0.100 bin/solr create_core -c test -d _default -p 8983

an error message is output like the following:

ERROR: Error CREATEing SolrCore 'test': Unable to create core [test1] Caused 
by: Can't find resource 'solrconfig.xml' in classpath or '/var/solr/data/test'

check the core status:

$ curl http://192.168.0.100:8983/solr/admin/cores
{
  "responseHeader":{
    "status":0,
    "QTime":0},
  
"initFailures":\{"test":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
 Could not load conf for core test: Error loading solr config from 
/opt/solr-9.0.0/server/solr/test/conf/solrconfig.xml"},
  "status":{}}

You can see that the core was created but can't be loaded by the solr server 
(because of no configuration files can be found in the conf sub-directory of 
the instance directory).

As a comparison, we can remotely create a new core using the following Solr API:

curl 
"http://192.168.0.100:8983/solr/admin/cores?action=CREATE&name=test&instanceDir=test&configSet=_default";

 

My question is how to fix this issue. Do we want to fixup the statement to 
match the real behavior or update the create_core tool to support remotely 
creating a core ?


> solr standalone: in-correct information in the help message for "bin/solr 
> create_core"
> --------------------------------------------------------------------------------------
>
>                 Key: SOLR-16254
>                 URL: https://issues.apache.org/jira/browse/SOLR-16254
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: cli
>    Affects Versions: 9.0
>            Reporter: Sun Rui
>            Priority: Major
>
> There is a statement in the help message for "bin/solr create_core":
> _*When a configSet is used, this can be run from remote (non-Solr) hosts.  If 
> pointing at a non-configSet directory, this must be run from the host that 
> you wish to create the core on.*_
> However, this is not case.
> Suppose there is a solr server instance launched at 192.168.0.100:8983. On a 
> different host (non-solr host), use the following command to create a new 
> core:
> SOLR_HOST=192.168.0.100 bin/solr create_core -c test -d _default -p 8983
> an error message is output like the following:
> ERROR: Error CREATEing SolrCore 'test': Unable to create core [test] Caused 
> by: Can't find resource 'solrconfig.xml' in classpath or '/var/solr/data/test'
> check the core status:
> $ curl [http://192.168.0.100:8983/solr/admin/cores]
> {
>   "responseHeader":
> {     "status":0,     "QTime":0}
> ,
>   
> "initFailures":\{"test":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
>  Could not load conf for core test: Error loading solr config from 
> /opt/solr-9.0.0/server/solr/test/conf/solrconfig.xml"},
>   "status":{}}
> You can see that the core was created but can't be loaded by the solr server 
> (because of no configuration files can be found in the conf sub-directory of 
> the instance directory).
> As a comparison, we can remotely create a new core using the following Solr 
> API:
> curl 
> "http://192.168.0.100:8983/solr/admin/cores?action=CREATE&name=test&instanceDir=test&configSet=_default";
>  
> My question is how to fix this issue. Do we want to fixup the statement to 
> match the real behavior or update the create_core tool to support remotely 
> creating a core ?



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to