Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-3477

SOLR does not start up when no cores are defined

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.6
    • Fix Version/s: 3.6.1, 4.0-ALPHA
    • Component/s: search
    • Labels:
      None
    • Environment:

      All environments

      Description

      Since version 3.6.0, Solr does not start up when no cores are defined in solr.xml. The problematic code is in CoresContainer.java, lines 171-173.

      org.apache.solr.common.SolrException: No cores were created, please check the logs for errors
      at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:172) ~[solr-core-3.6.0.jar:3.6.0 1310449 - rmuir - 2012-04-06 11:34:38]
      at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:96) ~[solr-core-3.6.0.jar:3.6.0 1310449 - rmuir - 2012-04-06 11:34:38]
      ...

      In our case, this is however a valid situation, because we create the cores programatically by calling the webservices to register new cores. The server is initially started with no cores defined, and depending on the configuration of our application, cores are then created dynamically.

      For the time being, we have to stick with version 3.5, which did not have this problem (or feature).

      1. SOLR-3477.patch
        3 kB
        Tomás Fernández Löbbe
      2. SOLR-3477-3_6.patch
        5 kB
        Jan Høydahl
      3. SOLR-3477-3_6.patch
        4 kB
        Tomás Fernández Löbbe

        Issue Links

          Activity

          Hide
          teofili Tommaso Teofili added a comment -

          IMHO this should be fixed, especially with SolrCloud (and collection management API, SOLR-3488) coming the described situation is likely to happen more frequently.

          Show
          teofili Tommaso Teofili added a comment - IMHO this should be fixed, especially with SolrCloud (and collection management API, SOLR-3488 ) coming the described situation is likely to happen more frequently.
          Hide
          teofili Tommaso Teofili added a comment -

          I just tested this doesn't apply to Solr 4 thus I think this issue can be marked as resolved with Fix Version 4.0.
          Sebastian, can you also check if your scenario works with Solr 4?

          Show
          teofili Tommaso Teofili added a comment - I just tested this doesn't apply to Solr 4 thus I think this issue can be marked as resolved with Fix Version 4.0. Sebastian, can you also check if your scenario works with Solr 4?
          Hide
          tomasflobbe Tomás Fernández Löbbe added a comment -

          I checked this and saw the same as Tommaso, it seems to work on trunk and 4x branch.
          I added a test case that start the CoreContainer with no cores (a solr.xml file with an empty list of cores). It works on trunk and fails on 3.6 with an exception as the one described in the description of this issue.

          Show
          tomasflobbe Tomás Fernández Löbbe added a comment - I checked this and saw the same as Tommaso, it seems to work on trunk and 4x branch. I added a test case that start the CoreContainer with no cores (a solr.xml file with an empty list of cores). It works on trunk and fails on 3.6 with an exception as the one described in the description of this issue.
          Hide
          teofili Tommaso Teofili added a comment -

          thanks Tomás, your patch looks good. I'll mark this as resolved in version 4.0

          Show
          teofili Tommaso Teofili added a comment - thanks Tomás, your patch looks good. I'll mark this as resolved in version 4.0
          Hide
          mange Magnus Bergmark added a comment -

          This still needs to be fixed for 3.6. We don't want to start running trunk in production here.

          Show
          mange Magnus Bergmark added a comment - This still needs to be fixed for 3.6. We don't want to start running trunk in production here.
          Hide
          mange Magnus Bergmark added a comment -

          Bug was introduced by SVN commit 1211850 in relation to SOLR-1730. Seems like just reverting that commit would fix the problem.

          Show
          mange Magnus Bergmark added a comment - Bug was introduced by SVN commit 1211850 in relation to SOLR-1730 . Seems like just reverting that commit would fix the problem.
          Hide
          janhoy Jan Høydahl added a comment -

          Updated 3.6 patch which simply removes the zero cores check/throw - this mirrors current trunk/4.0 code.

          Show
          janhoy Jan Høydahl added a comment - Updated 3.6 patch which simply removes the zero cores check/throw - this mirrors current trunk/4.0 code.
          Hide
          janhoy Jan Høydahl added a comment -

          Re-opening for 3.6.1

          Show
          janhoy Jan Høydahl added a comment - Re-opening for 3.6.1
          Hide
          janhoy Jan Høydahl added a comment -

          Checked in to 3.6 branch

          Show
          janhoy Jan Høydahl added a comment - Checked in to 3.6 branch
          Hide
          thetaphi Uwe Schindler added a comment -

          Bulk close for 3.6.1

          Show
          thetaphi Uwe Schindler added a comment - Bulk close for 3.6.1

            People

            • Assignee:
              teofili Tommaso Teofili
              Reporter:
              wastl Sebastian Schaffert
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development