Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3F318200CB5 for ; Wed, 12 Jul 2017 15:42:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3DC57168C9B; Wed, 12 Jul 2017 13:42:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6015F168C84 for ; Wed, 12 Jul 2017 15:42:08 +0200 (CEST) Received: (qmail 41560 invoked by uid 500); 12 Jul 2017 13:42:07 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 41549 invoked by uid 99); 12 Jul 2017 13:42:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jul 2017 13:42:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 12934195441 for ; Wed, 12 Jul 2017 13:42:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 7urSpBYj56uW for ; Wed, 12 Jul 2017 13:42:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id C58F862460 for ; Wed, 12 Jul 2017 13:42:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id B3860E0D95 for ; Wed, 12 Jul 2017 13:42:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 04F07246FE for ; Wed, 12 Jul 2017 13:42:01 +0000 (UTC) Date: Wed, 12 Jul 2017 13:42:01 +0000 (UTC) From: "Naganarasimha G R (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-6803) AM registration could fail if event processing is delayed. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 12 Jul 2017 13:42:09 -0000 [ https://issues.apache.org/jira/browse/YARN-6803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16083993#comment-16083993 ] Naganarasimha G R commented on YARN-6803: ----------------------------------------- Thanks [~bibinchundatt], Agree with the solution in the patch instead of {{AMLaunchedTransition}} we can store the clientToken in ClientToAMTokenSecretManager before launching in {{AttemptStoredTransition}} itself so that though there is any delay in event processing it should not affect the AM registering. > AM registration could fail if event processing is delayed. > ---------------------------------------------------------- > > Key: YARN-6803 > URL: https://issues.apache.org/jira/browse/YARN-6803 > Project: Hadoop YARN > Issue Type: Bug > Reporter: Bibin A Chundatt > Assignee: Bibin A Chundatt > Priority: Critical > Attachments: YARN-6803.001.patch > > > Steps to reproduce > # Submit application > # Delay application attempt AMLauch event processing > # Make AM register before AM Launch event is fired > {{DefaultAMSProcessor#registerApplicationMaster}} client token > {code} > if (UserGroupInformation.isSecurityEnabled()) { > LOG.info("Setting client token master key"); > response.setClientToAMTokenMasterKey(java.nio.ByteBuffer.wrap( > getRmContext().getClientToAMTokenSecretManager() > .getMasterKey(applicationAttemptId).getEncoded())); > } > {code} > {code} > org.apache.hadoop.yarn.exceptions.YarnRuntimeException: java.lang.NullPointerException: java.lang.NullPointerException > at org.apache.hadoop.yarn.server.resourcemanager.DefaultAMSProcessor.registerApplicationMaster(DefaultAMSProcessor.java:130) > at org.apache.hadoop.yarn.server.resourcemanager.ApplicationMasterService.registerApplicationMaster(ApplicationMasterService.java:217) > at org.apache.hadoop.yarn.api.impl.pb.service.ApplicationMasterProtocolPBServiceImpl.registerApplicationMaster(ApplicationMasterProtocolPBServiceImpl.java:90) > at org.apache.hadoop.yarn.proto.ApplicationMasterProtocol$ApplicationMasterProtocolService$2.callBlockingMethod(ApplicationMasterProtocol.java:95) > at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:522) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:991) > at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:869) > at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:815) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1965) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2675) > at org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator.register(RMCommunicator.java:177) > at org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator.serviceStart(RMCommunicator.java:121) > at org.apache.hadoop.mapreduce.v2.app.rm.RMContainerAllocator.serviceStart(RMContainerAllocator.java:280) > at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193) > at org.apache.hadoop.mapreduce.v2.app.MRAppMaster$ContainerAllocatorRouter.serviceStart(MRAppMaster.java:978) > at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193) > at org.apache.hadoop.service.CompositeService.serviceStart(CompositeService.java:120) > at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.serviceStart(MRAppMaster.java:1280) > at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193) > at org.apache.hadoop.mapreduce.v2.app.MRAppMaster$6.run(MRAppMaster.java:1733) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1965) > at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.initAndStartAppMaster(MRAppMaster.java:1729) > at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1660) > {code} > *Root Cause* > {{ClientToAMTokenSecretManagerInRM}} token master key is set only after AMLauch event is fired. > {{AMLaunchedTransition}} > {code} > // register the ClientTokenMasterKey after it is saved in the store, > // otherwise client may hold an invalid ClientToken after RM restarts. > if (UserGroupInformation.isSecurityEnabled()) { > appAttempt.rmContext.getClientToAMTokenSecretManager() > .registerApplication(appAttempt.getAppAttemptId(), > appAttempt.getClientTokenMasterKey()); > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org