Uploaded image for project: 'Metron (Retired)'
  1. Metron (Retired)
  2. METRON-1416 Upgrade Solr
  3. METRON-1589

'/api/v1/search/search' fails when 'Solr Zookeeper Urls' has comma separated multiple zookeeper urls

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Done
    • Major
    • Resolution: Done
    • None
    • 0.6.0
    • None

    Description

      http://metronnode:8082/api/v1/search/search with below payload fails with internal server error when 'Solr Zookeeper Urls' has comma separated multiple zookeeper urls

      {
       "indices": [],
       "facetFields": [],
       "query": "*",
       "from": 0,
       "size": 25
      }
      
      {"responseCode":500,"message":"Cannot connect to cluster at ctr-e138-1518143905142-328005-01-000006.hwx.site:2181/solr,ctr-e138-1518143905142-328005-01-000005.hwx.site:2181/solr: cluster not found/not ready","fullMessage":"SolrException: Cannot connect to cluster at ctr-e138-1518143905142-328005-01-000006.hwx.site:2181/solr,ctr-e138-1518143905142-328005-01-000005.hwx.site:2181/solr: cluster not found/not ready"}
      

       

      This appears to result from here SolrDao.java#L137-L144

      In `getSolrClient`, `withZkHost` should be called multiple times after splitting the comma delimited string, per CloudSolrClient.Builder#withZkHost.

      Overall, this could probably be done a couple ways, either to just split the String directly, or rearrange the methods to pass around Lists and have `getZkHost` be changed to `getZkHosts` and take care of it in a more contained manner.

      Attachments

        Issue Links

          Activity

            People

              justinleet Justin Leet
              justinleet Justin Leet
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: