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

Cannot use the namenode for HDFS HA as of Solr 6.4

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 6.4, 6.4.1
    • Fix Version/s: 6.4.2
    • Component/s: Hadoop Integration
    • Labels:
      None

      Description

      As of Solr 6.4, it seems it's no longer possible to use a namenode instead of a server address with the solr.hdfs.home parameter when configuring Solr with HDFS high availability (HA).

      Startup is fine, but when trying to create a collection, this error is in the logs:

      2017-02-27 22:22:57.359 ERROR (qtp401424608-21) [c:testing s:shard1  x:testing_shard1_replica1] o.a.s.c.CoreContainer Error creating core [testing_shard1_replica1]: Error Instantiating Update Handler, solr.DirectUpdateHandler2 failed to instantiate org.apache.solr.update.UpdateHandler
      org.apache.solr.common.SolrException: Error Instantiating Update Handler, solr.DirectUpdateHandler2 failed to instantiate org.apache.solr.update.UpdateHandler
      

      And after the full stack trace (which I will put in a comment), there is this:

      Caused by: java.lang.IllegalArgumentException: java.net.UnknownHostException: mycluster
      

      I started Solr with the params configured as system params instead of in solrconfig.xml, so my solr.in.sh has this:

      SOLR_OPTS="$SOLR_OPTS $SOLR_ZK_CREDS_AND_ACLS -Dsolr.directoryFactory=HdfsDirectoryFactory -Dsolr.lock.type=hdfs -Dsolr.hdfs.home=hdfs://mycluster:8020/solr-index -Dsolr.hdfs.confdir=/etc/hadoop/conf/"
      

      Solr in this case is running on the same nodes as Hadoop (Hortonworks HDP 2.5).

      I tried with a couple variations of defining the Solr home parameter:

      • hdfs://mycluster:8020/solr-index
      • hdfs://mycluster/solr-index
      • solr-index

      None of these variations worked with Solr 6.4.1 (the first 2 got the same error as above, the last was just wrong so it got a different error).

      I believe this problem is isolated to Solr 6.4.x. I tested the same setup (as in the solr.in.sh above) with 6.3.0 and it worked fine. Using the server address also works fine, but that negates the High Availability feature (which is like failover, for those who don't know).

      edit: the problem isn't just 6.4.1, I believe it's probably in 6.4.0 also

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ctargett Cassandra Targett
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: