You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2016/10/14 16:17:20 UTC

[jira] [Commented] (HADOOP-13720) Add more info to "token ... is expired" message

    [ https://issues.apache.org/jira/browse/HADOOP-13720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15575756#comment-15575756 ] 

Steve Loughran commented on HADOOP-13720:
-----------------------------------------

I'd add the current time too. Why? Helps identify one of those situations where the VMs clock is totally broken.

> Add more info to "token ... is expired" message
> -----------------------------------------------
>
>                 Key: HADOOP-13720
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13720
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: common, security
>            Reporter: Yongjun Zhang
>
> Currently AbstractDelegationTokenSecretM anager$checkToken does
> {code}
>   protected DelegationTokenInformation checkToken(TokenIdent identifier)
>       throws InvalidToken {
>     assert Thread.holdsLock(this);
>     DelegationTokenInformation info = getTokenInfo(identifier);
>     if (info == null) {
>       throw new InvalidToken("token (" + identifier.toString()
>           + ") can't be found in cache");
>     }
>     if (info.getRenewDate() < Time.now()) {
>       throw new InvalidToken("token (" + identifier.toString() + ") is expired");
>     }
>     return info;
>   } 
> {code}
> When a token is expried, we throw the above exception without printing out the {{info.getRenewDate()}} in the message. If we print it out, we could know for how long the token has not been renewed. This will help us investigate certain issues.
> Create this jira as a request to add that part.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org