From common-issues-return-148600-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Wed Feb 21 08:04:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 17D3718061A for ; Wed, 21 Feb 2018 08:04:04 +0100 (CET) Received: (qmail 73076 invoked by uid 500); 21 Feb 2018 07:04:04 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 73065 invoked by uid 99); 21 Feb 2018 07:04:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Feb 2018 07:04:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 61B6EC2231 for ; Wed, 21 Feb 2018 07:04:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 9KsCkQIB5XbQ for ; Wed, 21 Feb 2018 07:04:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 05F3E5F58D for ; Wed, 21 Feb 2018 07:04: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 31902E00D6 for ; Wed, 21 Feb 2018 07:04: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 6D7DA2108C for ; Wed, 21 Feb 2018 07:04:00 +0000 (UTC) Date: Wed, 21 Feb 2018 07:04:00 +0000 (UTC) From: "fang zhenyi (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-15234) NPE when initializing KMSWebApp MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-15234?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 371023#comment-16371023 ]=20 fang zhenyi commented on HADOOP-15234: -------------------------------------- Thanks [~xiaochen] for report this.I will attach a patch later. I'm able to reproduce this on trunk when I add the following configuration = to kms-site.xml. =C2=A0 {code:java} hadoop.kms.key.provider.uri jcek://file@/${user.home}/kms.keystore {code} I replace 'jceks' with 'jcek'. \{{hadoop.kms.key.provider.uri}} =C2=A0is no= t null when =C2=A0\{{keyProvider}} is initialized.But \{{keyProvider}}=C2= =A0is not initialized =C2=A0when we give =C2=A0wrong \{{hadoop.kms.key.prov= ider.uri}}.\{{keyProvider}}=C2=A0 is initialized by scheme \{{jceks}} in \{= {JavaKeyStoreProvider.java}}. =C2=A0 {code:java} /** * The factory to create JksProviders, which is used by the ServiceLoader. */ public static class Factory extends KeyProviderFactory { @Override public KeyProvider createProvider(URI providerName, Configuration conf) throws IOException = { if (SCHEME_NAME.equals(providerName.getScheme())) { return new JavaKeyStoreProvider(providerName, conf); } return null; } } {code} what do you think? =C2=A0 =C2=A0 =C2=A0 > NPE when initializing KMSWebApp > ------------------------------- > > Key: HADOOP-15234 > URL: https://issues.apache.org/jira/browse/HADOOP-15234 > Project: Hadoop Common > Issue Type: Bug > Components: kms > Reporter: Xiao Chen > Assignee: fang zhenyi > Priority: Major > > During KMS startup, if the {{keyProvider}} is null, it will NPE inside Ke= yProviderExtension. > {noformat} > java.lang.NullPointerException > =09at org.apache.hadoop.crypto.key.KeyProviderExtension.(KeyProvide= rExtension.java:43) > =09at org.apache.hadoop.crypto.key.CachingKeyProvider.(CachingKeyPr= ovider.java:93) > =09at org.apache.hadoop.crypto.key.kms.server.KMSWebApp.contextInitialize= d(KMSWebApp.java:170) > {noformat} > We're investigating the exact scenario that could lead to this, but the N= PE and log around it can be improved. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org