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

Zookeeper flag ignored when enabling authentication in 8.10.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • None
    • None
    • None
    • None

    Description

      When enabling authentication in Apache SolR 8.10.0 (running in SolrCloud cluster mode), the `-z` flag does not seem to be taken into account and ultimately produces the following error:

      $ bin/solr auth enable -type basicAuth -credentials admin:admin -blockUnknown true -z zk1:2181
      Exception in thread "main" org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /security.json at org.apache.zookeeper.KeeperException.create(KeeperException.java:118) at org.apache.zookeeper.KeeperException.create(KeeperException.java:54) at org.apache.zookeeper.ZooKeeper.setData(ZooKeeper.java:2561) at org.apache.solr.common.cloud.SolrZkClient.lambda$setData$7(SolrZkClient.java:355) at org.apache.solr.common.cloud.ZkCmdExecutor.retryOperation(ZkCmdExecutor.java:79) at org.apache.solr.common.cloud.SolrZkClient.setData(SolrZkClient.java:355) at org.apache.solr.common.cloud.SolrZkClient.setData(SolrZkClient.java:575) at org.apache.solr.util.SolrCLI$AuthTool.handleBasicAuth(SolrCLI.java:4435) at org.apache.solr.util.SolrCLI$AuthTool.runTool(SolrCLI.java:4209) at org.apache.solr.util.SolrCLI.main(SolrCLI.java:304)
      

      Zookeeper host is reachable and properly configured. Using `-zkHost` instead of `-z` does seem to solve the issue:

      $ bin/solr auth enable -type basicAuth -credentials admin:admin -blockUnknown true -zkHost zk1:2181
      
      Solr include file /opt/solr/bin/solr.in.sh doesn't exist or is not writeable.
      
      Add the following lines to the solr.in.sh file so that the ./solr script can use subsequently.
      
      SOLR_AUTH_TYPE="basic"
      SOLR_AUTHENTICATION_OPTS="-Dbasicauth=admin:admin"
      

      Is this something expected? To add more context, using `-z` was totally functional in version `8.9.0`. Furthermore, the CLI tool does list that option:

      bin/solr auth --help | grep Zookeeper
        -z zkHost                              Zookeeper connection string. Unnecessary if ZK_HOST is defined in solr.in.sh.
      

      Attachments

        1. solr_zookeeper_error.png
          211 kB
          Jose Antonio Carmona

        Issue Links

          Activity

            People

              janhoy Jan H√łydahl
              jcarmona Jose Antonio Carmona
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m