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.

Capturing dleegation token in kerberozied cluster is failing

Capturing dleegation token in kerberozied cluster is failing

Explorer

Hi,

 

I have a kerberized cluster and trying to capture delegation token to a file, so that I can push data into the cluster from Linux server using that Delegation token. To achieve this I am using fetchdt command in hadoop and try to capture output to a file. But when I do this I am getting following error when I run it on command line.

 

command: hdfs fetchdt dtfile

 

error: Exception in thread "main" java.lang.NullPointerException
at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getDelegationToken(ClientNamenodeProtocolTranslatorPB.java:849)
at org.apache.hadoop.hdfs.DFSClient.getDelegationToken(DFSClient.java:920)
at org.apache.hadoop.hdfs.DistributedFileSystem.getDelegationToken(DistributedFileSystem.java:1336)
at org.apache.hadoop.fs.FileSystem.collectDelegationTokens(FileSystem.java:527)
at org.apache.hadoop.fs.FileSystem.addDelegationTokens(FileSystem.java:505)
at org.apache.hadoop.hdfs.tools.DelegationTokenFetcher$1.run(DelegationTokenFetcher.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
at org.apache.hadoop.hdfs.tools.DelegationTokenFetcher.main(DelegationTokenFetcher.java:151)

 

 

 

Thanks for the help!!

2 REPLIES 2

Re: Capturing dleegation token in kerberozied cluster is failing

Explorer

hdfs fetchdt --renew Dtfile fixed this issue. But I need some help in how I can use this token to submit a Job.

 

I tried setting HADOOP_TOKEN_FILE_LOCATION to the path of delegation token file but when I submit any job says tgt not found.

 

 

Highlighted

Re: Capturing dleegation token in kerberozied cluster is failing

New Contributor

According to the following article, run a kdestroy for removing any kerberos ticket prior to use the delegation token.

 

https://community.hortonworks.com/articles/50069/demystifying-delegation-token.html

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