[
https://issues.apache.org/jira/browse/SOLR-15675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17425702#comment-17425702
]
Jose Antonio Carmona commented on SOLR-15675:
---------------------------------------------
Okay, so that explains why using "-zkHost" succeeds: SolR is not taking into
account the Zookeeper host. In fact, completely removing this flag does produce
the same output:
{code:bash}
$ bin/solr auth enable -type basicAuth -credentials admin:admin -blockUnknown
true
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}
However, specifying "-z" or "-zkhost" as suggested ends up in the
aforementioned exception... This is something strange, as this was not
happening in version "8.9.0" *using the exact same Zookeeper setup*...
Furthermore, the "security.json" file seems to exist in Zookeeper:
{code:bash}
$ zkCli.sh ls /solr
[aliases.json, autoscaling, autoscaling.json, clusterstate.json, collections,
configs, live_nodes, overseer, overseer_elect, security.json]
{code}
I still think there is something strange here, or maybe I'm missing a point.
> 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
> Assignee: Jan Høydahl
> Priority: Minor
>
> 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]