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

Solr does not respect waitForZk (SOLR_WAIT_FOR_ZK) property

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 7.1, 7.2, 7.2.1, 7.3, 7.3.1, 7.4, 7.5, 7.6, 7.7, 7.7.1, 7.7.2, 7.7.3, 8.0, 8.1, 8.1.1, 8.2, 8.3, 8.3.1, 8.4, 8.4.1, 8.5, 8.5.1
    • 8.7
    • None
    • None

    Description

      When starting Solr in cloud mode, if zookeeper is not available within 30 seconds, then core container intialization fails and the node will not recover when zookeeper is available.

       

      I believe SOLR-5129 should have addressed this issue, however it doesn't quite do so for two reasons:

      1. https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java#L297 it calls SolrZkClient(String zkServerAddress, int zkClientTimeout) rather than SolrZkClient(String zkServerAddress, int zkClientTimeout, int zkClientConnectTimeout) so the DEFAULT_CLIENT_CONNECT_TIMEOUT of 30 seconds is used even when you specify a different waitForZk value
      2. bin/solr contains script to set -DwaitForZk from the SOLR_WAIT_FOR_ZK environment property https://github.com/apache/lucene-solr/blob/master/solr/bin/solr#L2148 but there is no corresponding assignment in bin/solr.cmd, while SOLR_WAIT_FOR_ZK appears in the solr.in.cmd as an example.

       

      I will attach a patch that fixes the above.

      Attachments

        1. SOLR-14503.patch
          5 kB
          cjcowie
        2. SOLR-14503.patch
          2 kB
          cjcowie

        Issue Links

          Activity

            People

              munendrasn Munendra S N
              colvinco Colvin Cowie
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: