Reply
Explorer
Posts: 24
Registered: ‎07-30-2014

Capturing dleegation token in kerberozied cluster is failing

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!!

Explorer
Posts: 24
Registered: ‎07-30-2014

Re: Capturing dleegation token in kerberozied cluster is failing

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.

 

 

New Contributor
Posts: 4
Registered: ‎09-07-2016

Re: Capturing dleegation token in kerberozied cluster is failing

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

Announcements