Configset upload failed with error code 400

Created on 25 February 2022, over 3 years ago
Updated 15 June 2025, 12 days ago

Respect the submission guidelines above! Drupal.org issue forks cause additional work for the project maintainer!

  • Solr version: 8.9
  • Drupal Core version: 9
  • Search API version: 8.x-1.23
  • Search API Solr version: 4.2.7

I get this error message whenever I try to upload the configset. I think I've followed all steps in the documentation:
I'm using xampp to setup the drupal9 site, I have used ddev config in the project directory, copied the necessary contents into the .ddev folder, made a search API as instructed, with the given username and password from "Apache Solr (Cloud) Integration for DDEV-Local".I run solr cloud and can access it from ddev-site so it should be working fine till this point. When I get the incompatible Solr Schema message and try to upload the configset I get the following error:

Configset upload failed with error code 400: Solr HTTP error: OK (400) { "responseHeader":{ "status":400, "QTime":64}, "error":{ "metadata":[ "error-class","org.apache.solr.common.SolrException", "root-error-class","org.apache.solr.common.SolrException"], "msg":"Trying to make an unstrusted ConfigSet update on a trusted configSet", "code":400}}

💬 Support request
Status

Fixed

Version

4.3

Component

Documentation

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇰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' in search_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.

Production build 0.71.5 2024