Jose Antonio Carmona created SOLR-15675:
-------------------------------------------
Summary: Zookeeper flag ignored when enabling authentication in
8.10.0
Key: SOLR-15675
URL: https://issues.apache.org/jira/browse/SOLR-15675
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Reporter: Jose Antonio Carmona
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:
{code:bash}
$ 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)
{code}
Zookeeper host is reachable and properly configured. Using `-zkHost` instead of
`-z` does seem to solve the issue:
{code:bash}
$ 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"
{code}
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:
{code:bash}
bin/solr auth --help | grep Zookeeper
-z zkHost Zookeeper connection string.
Unnecessary if ZK_HOST is defined in solr.in.sh.
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]