You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/08/22 12:44:00 UTC

[jira] [Commented] (ZOOKEEPER-2581) Not handled NullPointerException while creating key manager and trustManager

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

ASF GitHub Bot commented on ZOOKEEPER-2581:
-------------------------------------------

GitHub user maoling opened a pull request:

    https://github.com/apache/zookeeper/pull/339

    ZOOKEEPER-2581:Not handled NullPointerException while creating key manager and trustManager

    - when **zookeeper.ssl.keyStore.password**    is null,**keyStorePasswordProp** is **null** ,then **keyStorePassword.toCharArray()** is called,it will throw a NPE. we should handle this NPE gracefully
    - I just follow an example from [createSSLContext](https://github.com/apache/zookeeper/blob/master/src/java/main/org/apache/zookeeper/common/X509Util.java#L87)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/maoling/zookeeper ZOOKEEPER-2581

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/339.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #339
    
----
commit af05da12f86dd062bbcefc5be2b8ab79c762d99f
Author: maoling <ma...@sina.com>
Date:   2017-08-22T10:47:20Z

    ZOOKEEPER-2581:Not handled NullPointerException while creating key
    manager and trustManager

----


> Not handled NullPointerException while creating key manager and trustManager
> ----------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2581
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2581
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.5.1
>            Reporter: Rakesh Kumar Singh
>            Assignee: Rakesh Kumar Singh
>
> Not handled NullPointerException while creating key manager and trustManager:-
> 2016-09-14 13:35:23,488 [myid:1] - ERROR [CommitProcWorkThread-1:X509AuthenticationProvider@78] - Failed to create key manager
> org.apache.zookeeper.common.X509Exception$KeyManagerException: java.lang.NullPointerException
> 	at org.apache.zookeeper.common.X509Util.createKeyManager(X509Util.java:129)
> 	at org.apache.zookeeper.server.auth.X509AuthenticationProvider.<init>(X509AuthenticationProvider.java:75)
> 	at org.apache.zookeeper.server.auth.ProviderRegistry.initialize(ProviderRegistry.java:42)
> 	at org.apache.zookeeper.server.auth.ProviderRegistry.getProvider(ProviderRegistry.java:68)
> 	at org.apache.zookeeper.server.PrepRequestProcessor.checkACL(PrepRequestProcessor.java:319)
> 	at org.apache.zookeeper.server.FinalRequestProcessor.processRequest(FinalRequestProcessor.java:324)
> 	at org.apache.zookeeper.server.quorum.CommitProcessor$CommitWorkRequest.doWork(CommitProcessor.java:296)
> 	at org.apache.zookeeper.server.WorkerService$ScheduledWorkRequest.run(WorkerService.java:162)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NullPointerException
> 	at org.apache.zookeeper.common.X509Util.createKeyManager(X509Util.java:113)
> 	... 10 more
> 2016-09-14 13:35:23,489 [myid:1] - ERROR [CommitProcWorkThread-1:X509AuthenticationProvider@90] - Failed to create trust manager
> org.apache.zookeeper.common.X509Exception$TrustManagerException: java.lang.NullPointerException
> 	at org.apache.zookeeper.common.X509Util.createTrustManager(X509Util.java:158)
> 	at org.apache.zookeeper.server.auth.X509AuthenticationProvider.<init>(X509AuthenticationProvider.java:87)
> 	at org.apache.zookeeper.server.auth.ProviderRegistry.initialize(ProviderRegistry.java:42)
> 	at org.apache.zookeeper.server.auth.ProviderRegistry.getProvider(ProviderRegistry.java:68)
> 	at org.apache.zookeeper.server.PrepRequestProcessor.checkACL(PrepRequestProcessor.java:319)
> 	at org.apache.zookeeper.server.FinalRequestProcessor.processRequest(FinalRequestProcessor.java:324)
> 	at org.apache.zookeeper.server.quorum.CommitProcessor$CommitWorkRequest.doWork(CommitProcessor.java:296)
> 	at org.apache.zookeeper.server.WorkerService$ScheduledWorkRequest.run(WorkerService.java:162)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NullPointerException
> 	at org.apache.zookeeper.common.X509Util.createTrustManager(X509Util.java:143)
> 	... 10 more



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)