Created 05-10-2018 02:21 PM
Trying to access the access zookeeper from the client. Throws up a Auth error. Executing as
./zkcli.sh -zkhost localhost:2181 -cmd list
from the folder
/usr/lib/ambari-infra-solr/server/scripts/cloud-scripts
Gived the exception
Exception in thread "main" org.apache.zookeeper.KeeperException$NoAuthException: KeeperErrorCode = NoAuth for /hive at org.apache.zookeeper.KeeperException.create(KeeperException.java:113) at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) at org.apache.zookeeper.ZooKeeper.getData(ZooKeeper.java:1155) at org.apache.solr.common.cloud.SolrZkClient$7.execute(SolrZkClient.java:345) at org.apache.solr.common.cloud.SolrZkClient$7.execute(SolrZkClient.java:342) at org.apache.solr.common.cloud.ZkCmdExecutor.retryOperation(ZkCmdExecutor.java:60) at org.apache.solr.common.cloud.SolrZkClient.getData(SolrZkClient.java:342) at org.apache.solr.common.cloud.SolrZkClient.printLayout(SolrZkClient.java:583) at org.apache.solr.common.cloud.SolrZkClient.printLayout(SolrZkClient.java:608) at org.apache.solr.common.cloud.SolrZkClient.printLayoutToStdOut(SolrZkClient.java:624) at org.apache.solr.cloud.ZkCLI.main(ZkCLI.java:244)
The kerberos ticket is initialized using kinit and have the permissions to access zk. Any pointers? Can some one let me know what Auth that is needed here?
Created 05-10-2018 04:28 PM
@J Koppole, Since you are using kerberos, replace localhost with FQDN and re-run the command.
Created 05-10-2018 04:30 PM
I was using FQDN just replaced with local host as I didnt want to post the hostname there. Tried both with FQDN and localhost
Created 05-10-2018 06:40 PM
Hi @J Koppole
you can do this before using zkcli.sh of infra-solr
sudo -u infra-solr -i kinit -kt /etc/security/keytabs/ambari-infra-solr.service.keytab $(whoami)/$(hostname -f)
source /etc/ambari-infra-solr/conf/infra-solr-env.sh export SOLR_ZK_CREDS_AND_ACLS="${SOLR_AUTHENTICATION_OPTS}"
Created 05-10-2018 06:51 PM
Its exactly the same error again
Exception in thread "main" org.apache.zookeeper.KeeperException$NoAuthException: KeeperErrorCode = NoAuth for /hive at org.apache.zookeeper.KeeperException.create(KeeperException.java:113) at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) at org.apache.zookeeper.ZooKeeper.getData(ZooKeeper.java:1155) at org.apache.solr.common.cloud.SolrZkClient$7.execute(SolrZkClient.java:345) at org.apache.solr.common.cloud.SolrZkClient$7.execute(SolrZkClient.java:342) at org.apache.solr.common.cloud.ZkCmdExecutor.retryOperation(ZkCmdExecutor.java:60) at org.apache.solr.common.cloud.SolrZkClient.getData(SolrZkClient.java:342) at org.apache.solr.common.cloud.SolrZkClient.printLayout(SolrZkClient.java:583) at org.apache.solr.common.cloud.SolrZkClient.printLayout(SolrZkClient.java:608) at org.apache.solr.common.cloud.SolrZkClient.printLayoutToStdOut(SolrZkClient.java:624) at org.apache.solr.cloud.ZkCLI.main(ZkCLI.java:244)
Created 05-15-2018 05:25 PM
Sudo to infra-solr user
su - infra-solr
kinit -kt <solr-keytab>
and run
source /etc/ambari-infra-solr/conf/infra-solr-env.sh
/usr/lib/ambari-infra-solr/server/scripts/cloud-scripts/zkcli.sh --zkhost "${ZK_HOST}" -cmd list