Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

zkcli client unable to fetch data

zkcli client unable to fetch data

Contributor

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?

5 REPLIES 5

Re: zkcli client unable to fetch data

@J Koppole, Since you are using kerberos, replace localhost with FQDN and re-run the command.

Re: zkcli client unable to fetch data

Contributor

I was using FQDN just replaced with local host as I didnt want to post the hostname there. Tried both with FQDN and localhost

Highlighted

Re: zkcli client unable to fetch data

New Contributor

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}"

Re: zkcli client unable to fetch data

Contributor

@Olivér Szabó

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)


Re: zkcli client unable to fetch data

Contributor

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

Don't have an account?
Coming from Hortonworks? Activate your account here