hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bibin A Chundatt (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (YARN-6198) getAMRMToken for application with unmanaged AM fail in secure mode
Date Wed, 15 Feb 2017 11:33:41 GMT

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

Bibin A Chundatt edited comment on YARN-6198 at 2/15/17 11:33 AM:
------------------------------------------------------------------

Please find initial *Analysis* 
In {{RMAppImpl#createAndGetApplicationReport}} 
{code}
          if (getApplicationSubmissionContext().getUnmanagedAM() &&
              clientUserName != null && getUser().equals(clientUserName)) {
            Token<AMRMTokenIdentifier> token = currentAttempt.getAMRMToken();
            if (token != null) {
              amrmToken = BuilderUtils.newAMRMToken(token.getIdentifier(),
                  token.getKind().toString(), token.getPassword(),
                  token.getService().toString());
            }
          }
{code}

*getUser()* = UserGroupInformation.getCurrentUser().getShortUserName()
*clientUserName* = UserGroupInformation.getCurrentUser().getUserName()  

{{org.apache.hadoop.security.User}}
{code}
  /**
   * Get the full name of the user.
   */
  @Override
  public String getName() {
    return fullName;
  }
  
  /**
   * Get the user name up to the first '/' or '@'
   * @return the leading part of the user name
   */
  public String getShortName() {
    return shortName;
  }
{code}




was (Author: bibinchundatt):
Please find initial *Analysis* 
In {{RMAppImpl#createAndGetApplicationReport}} 
{code}
          if (getApplicationSubmissionContext().getUnmanagedAM() &&
              clientUserName != null && getUser().equals(clientUserName)) {
            Token<AMRMTokenIdentifier> token = currentAttempt.getAMRMToken();
            if (token != null) {
              amrmToken = BuilderUtils.newAMRMToken(token.getIdentifier(),
                  token.getKind().toString(), token.getPassword(),
                  token.getService().toString());
            }
          }
{code}

*getUser()* = UserGroupInformation.getCurrentUser().getShortUserName()
*clientUserName* = UserGroupInformation.getCurrentUser().getUserName()  

{code}
  /**
   * Get the user's full principal name.
   * @return the user's full principal name.
   */
  @InterfaceAudience.Public
  @InterfaceStability.Evolving
  public String getUserName() {
    return user.getName();
  }
{code}



> getAMRMToken for  application with unmanaged AM fail in secure mode
> -------------------------------------------------------------------
>
>                 Key: YARN-6198
>                 URL: https://issues.apache.org/jira/browse/YARN-6198
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Bibin A Chundatt
>
> *Command*
> ./yarn jar ../share/hadoop/yarn/hadoop-yarn-applications-unmanaged-am-launcher-3.0.0-alpha3-SNAPSHOT.jar
-appname bibin -cmd "sleep 10"
> {code}
>   public void launchAM(ApplicationAttemptId attemptId) 
>     throws IOException, YarnException {
>     Credentials credentials = new Credentials();
>     Token<AMRMTokenIdentifier> token = 
>         rmClient.getAMRMToken(attemptId.getApplicationId());
>     // Service will be empty but that's okay, we are just passing down only
>     // AMRMToken down to the real AM which eventually sets the correct
>     // service-address.
>     credentials.addToken(token.getService(), token);
> {code}
> Token is not received.
> {noformat}
> 2017-02-15 16:14:58,188 FATAL unmanagedamlauncher.UnmanagedAMLauncher: Error running
Client
> java.lang.NullPointerException
> 	at org.apache.hadoop.yarn.applications.unmanagedamlauncher.UnmanagedAMLauncher.launchAM(UnmanagedAMLauncher.java:186)
> 	at org.apache.hadoop.yarn.applications.unmanagedamlauncher.UnmanagedAMLauncher.run(UnmanagedAMLauncher.java:354)
> 	at org.apache.hadoop.yarn.applications.unmanagedamlauncher.UnmanagedAMLauncher.main(UnmanagedAMLauncher.java:111)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.apache.hadoop.util.RunJar.run(RunJar.java:239)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:153)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message