- 🇩🇰Denmark ressa Copenhagen
Just leaving a tip, since others might run into this: Remember to update Connector Workarounds - Solr version override from "8.x" to "Determine automatically".
I was upgrading to Solr 9.6.1 Cloud with Basic Auth but every time I tried to "Upload Configset" I got this error:
Message Drupal\search_api_solr\SearchApiSolrException: Creating collection solrcore failed with error code 400: Solr HTTP error: OK (400) { "responseHeader": { "status": 400, "QTime": 1040 }, "error": { "metadata": ["error-class", "org.apache.solr.common.SolrException", "root-error-class", "org.apache.solr.common.SolrException"], "msg": "Underlying core creation failed while creating collection: solrcore", "code": 400 } } in Drupal\search_api_solr\Plugin\SolrConnector\StandardSolrCloudConnector->createCollection() (line 409 of /var/www/html/web/modules/contrib/search_api_solr/src/Plugin/SolrConnector/StandardSolrCloudConnector.php).
It wasn't until I compared a working config with the problematic site, that I noticed an "8" in the config file, under
solr_version: '8'
insearch_api.server.solr_server.yml
. After I updated Connector Workarounds > Solr version override from "8.x" to "Determine automatically" I could finally "Upload Configset", as well as with Drush:$ drush --numShards=1 search-api-solr:upload-configset solr_server [success] Solr configset for solr_server uploaded.
Previously I would get this error:
$ drush --numShards=1 search-api-solr:upload-configset solr_server In StandardSolrCloudConnector.php line 409: Creating collection solrcore failed with error code 400: Solr HTTP error: OK (400) { "responseHeader": { "status": 400, "QTime": 924 }, "error": { "metadata": ["error-class", "org.apache.solr.common.SolrException", "root-error-class", "org.apache.solr.common.SolrException"], "msg": "Underlying core creation failed while creating collection: solrcore", "code": 400 } } In Result.php line 73: Solr HTTP error: OK(400) { "responseHeader": { "status": 400, "QTime": 924 }, "error": { "metadata": ["error-class", "org.apache.solr.common.SolrException", "root-error-class", "org.apache.solr.common.SolrException"], "msg": "Underlying core creation failed while creating collection: solrcore", "code": 400 } }
Leaving some details here, in case someone else run into the same strange errors.
Actually, would it be worth adding a warning at the top of the Solr Server page (admin/config/search/search-api/server/solr_server), like this?
An old version ("8.0.0") is set under "Connector Workarounds", while detected Solr Version is 9.6.1. "Determine automatically" is recommended. You may see code 400 solrcore collection creation failed errors.