user1518944
user1518944

Reputation: 31

Cloudera Hadoop access with Kerberos gives TokenCache error : Can't get Master Kerberos principal for use as renewer

I am trying to access Cloudera Hadoop setup (HIVE + Impala) from Mac Book Pro OS X 10.8.4.

We have Cloudera CDH-4.3.0 installed on Linux servers. I have extracted CDH-4.2.0 tarball to my Mac Book Pro.

I have set proper configuration and Kerberos credentials so that commands like 'hadoop -fs -ls /' works and HIVE shell starts up.

However when I do 'show databases' command it gives following error:

> hive
> show databases;
>
 Failed with exception java.io.IOException:java.io.IOException: Can't get Master Kerberos    principal for use as renewer

The error is related to TokenCache.

When I searched for error, it seems following method 'obtainTokensForNamenodesInternal' throws this error when it tries to get a delegation token for specific FS and fails.

http://hadoop.apache.org/docs/current/api/src-html/org/apache/hadoop/mapreduce/security/TokenCache.html

On client side I don't see any error in HIVE shell logs. I have also tried using tarballs of CDH 4.3.0 with same configuration I get the same error.

Any help or pointers for resolving this error would be highly appreciated.

Upvotes: 0

Views: 4610

Answers (2)

Create a new Gateway YARN role instance in the host from Cloudera Manager. It will automatically setup and update the yarn-site.xml.

Upvotes: 1

atupal
atupal

Reputation: 17210

It seems that you have not config the kerberos for yarn. Add the follow configure in your yarn-site.cml

<property>
    <name>yarn.nodemanager.principal</name>
    <value>yarn_priciple/fqdn@_HOST</value>
</property>
<property>
    <name>yarn.resourcemanager.principal</name>
    <value>yarn_priciple/fqdn@_HOST</value>
</property> 

Upvotes: 3

Related Questions