hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fang zhenyi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-15234) NPE when initializing KMSWebApp
Date Wed, 21 Feb 2018 07:04:00 GMT

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

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.

I replace 'jceks' with 'jcek'. \{{hadoop.kms.key.provider.uri}}  is not null when  \{{keyProvider}}
is initialized.But \{{keyProvider}} is not initialized  when we give  wrong \{{hadoop.kms.key.provider.uri}}.\{{keyProvider}} 
is initialized by scheme \{{jceks}} in \{{JavaKeyStoreProvider.java}}.

 * The factory to create JksProviders, which is used by the ServiceLoader.
public static class Factory extends KeyProviderFactory {
  public KeyProvider createProvider(URI providerName,
                                    Configuration conf) throws IOException {
    if (SCHEME_NAME.equals(providerName.getScheme())) {
      return new JavaKeyStoreProvider(providerName, conf);
    return null;
what do you think?




> 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 KeyProviderExtension.
> {noformat}
> java.lang.NullPointerException
> 	at org.apache.hadoop.crypto.key.KeyProviderExtension.<init>(KeyProviderExtension.java:43)
> 	at org.apache.hadoop.crypto.key.CachingKeyProvider.<init>(CachingKeyProvider.java:93)
> 	at org.apache.hadoop.crypto.key.kms.server.KMSWebApp.contextInitialized(KMSWebApp.java:170)
> {noformat}
> We're investigating the exact scenario that could lead to this, but the NPE and log around
it can be improved.

This message was sent by Atlassian JIRA

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

View raw message