[
https://issues.apache.org/jira/browse/SOLR-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ishan Chattopadhyaya updated SOLR-5970:
---------------------------------------
Attachment: solrconfig.xml
schema.xml
bad.jar
Thanks for looking into this, Esther. Here's a situation where I still see
status 0 for a failed collection creation.
{code}
$ cd solr; ant server
Create a directory, "badconf" containing the schema.xml and solrconfig.xml that
I've attached here.
Copy the bad.jar file to {{server/solr-webapp/webapp/WEB-INF/lib}}. It is just
a compiled version of the ThrowErrorOnInitRequestHandler.java.
$ bin/solr -c
$ bin/solr zk -upconfig -d badconf -n bad -z localhost:9983
Connecting to ZooKeeper at localhost:9983 ...
Uploading /home/ishan/code/lucene-solr/solr/badconf for config bad to ZooKeeper
at localhost:9983
$ curl
"http://localhost:8983/solr/admin/collections?action=CREATE&name=test1&numShards=1&replicationFactor=2&maxShardsPerNode=2&collection.configName=bad"
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int
name="QTime">32069</int></lst><lst name="failure"><str
name="192.168.137.211:8983_solr">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error
from server at http://192.168.137.211:8983/solr: Error CREATEing SolrCore
'test1_shard1_replica1': Unable to create core [test1_shard1_replica1] Caused
by: Doing my job, throwing a java.lang.Error</str><str
name="192.168.137.211:8983_solr">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error
from server at http://192.168.137.211:8983/solr: Error CREATEing SolrCore
'test1_shard1_replica2': Unable to create core [test1_shard1_replica2] Caused
by: Doing my job, throwing a java.lang.Error</str></lst>
</response>
{code}
As you see, the collection creation failed, yet the status was 0. Also
attaching a unit test that demonstrates the problem.
> Create collection API always has status 0
> -----------------------------------------
>
> Key: SOLR-5970
> URL: https://issues.apache.org/jira/browse/SOLR-5970
> Project: Solr
> Issue Type: Bug
> Reporter: Abraham Elmahrek
> Attachments: bad.jar, schema.xml, solrconfig.xml
>
>
> The responses below are from a successful create collection API
> (https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-CreateormodifyanAliasforaCollection)
> call and an unsuccessful create collection API call. It seems the 'status'
> is always 0.
> Success:
> {u'responseHeader': {u'status': 0, u'QTime': 4421}, u'success': {u'':
> {u'core': u'test1_shard1_replica1', u'responseHeader': {u'status': 0,
> u'QTime': 3449}}}}
> Failure:
> {u'failure':
> {u'':
> u"org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error
> CREATEing SolrCore 'test43_shard1_replica1': Unable to create core:
> test43_shard1_replica1 Caused by: Could not find configName for collection
> test43 found:[test1]"},
> u'responseHeader': {u'status': 0, u'QTime': 17149}
> }
> It seems like the status should be 400 or something similar for an
> unsuccessful attempt?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]