You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/02/26 17:57:00 UTC

[jira] [Commented] (GEODE-4362) view preparation throws uncaught RuntimeException

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

ASF subversion and git services commented on GEODE-4362:
--------------------------------------------------------

Commit fff05c5ba3f84e456f77b47f009347a30e6a51b8 in geode's branch refs/heads/feature/GEODE-4362 from [~bschuchardt]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=fff05c5 ]

GEODE-4362: view preparation throws uncaught RuntimeException

Galen cleaned up GMSEncrypt and then we worked together to fix this bug.
The problem was happening when a new member joined with a coordinator that
suddenly shuts down before other members have been told to install the
new membership view.  They've received a "prepare for view change" message
containing the new view but have not been told to commit that change.

Another member then becomes coordinator and sees that there was a new member
in the prepared view.  It picks this up and adds it to the new view it
sends out.

The problem was that the public encryption keys of the members weren't
being transferred from the old view to the new view and when looking for
public keys we were fishing them out of GMSEncrypt instead of getting
them from the membership view.  This caused an NPE to be thrown when trying
to fish out the public key of the new member - GMSEncrypt didn't know about
this new member because the view containing it was never installed - it
was only prepared.

The fix is to transfer the public keys from the old view to the new one and
to look for public keys in the view instead of GMSEncrypt.


> view preparation throws uncaught RuntimeException
> -------------------------------------------------
>
>                 Key: GEODE-4362
>                 URL: https://issues.apache.org/jira/browse/GEODE-4362
>             Project: Geode
>          Issue Type: Bug
>          Components: membership
>            Reporter: Bruce Schuchardt
>            Assignee: Galen O'Sullivan
>            Priority: Major
>
> I put a pause in Services.installView() before the view is passed to the Messenger service and ran LocatorUDPSecurityDUnitTest.testCollocatedLocatorWithSecurity() and encountered a RuntimeException:
>  {noformat}
> [vm1] java.lang.RuntimeException: Not found public key for member 10.118.20.12(68202)<v31>:32773
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.messenger.GMSEncrypt.getPublicKey(GMSEncrypt.java:178)
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.messenger.JGroupsMessenger.getPublicKey(JGroupsMessenger.java:1367)
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave.addPublicKeysToView(GMSJoinLeave.java:933)
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave.sendView(GMSJoinLeave.java:896)
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave.prepareView(GMSJoinLeave.java:838)
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave$ViewCreator.prepareAndSendView(GMSJoinLeave.java:2385)
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave$ViewCreator.sendInitialView(GMSJoinLeave.java:2031)
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave$ViewCreator.run(GMSJoinLeave.java:2091)
> [vm1] Caused by: java.lang.NullPointerException
> [vm1] 	at java.security.spec.EncodedKeySpec.<init>(EncodedKeySpec.java:56)
> [vm1] 	at java.security.spec.X509EncodedKeySpec.<init>(X509EncodedKeySpec.java:64)
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.messenger.GMSEncrypt.getPublicKey(GMSEncrypt.java:545)
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.messenger.GMSEncrypt$PeerEncryptor.<init>(GMSEncrypt.java:377)
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.messenger.GMSEncrypt.createPeerEncryptor(GMSEncrypt.java:301)
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.messenger.GMSEncrypt.getPeerEncryptor(GMSEncrypt.java:259)
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.messenger.GMSEncrypt.getPublicKey(GMSEncrypt.java:176)
> [vm1] 	... 7 more
> {noformat}
> Since GMSJoinLeave already had the new view installed and JGroupsMessenger did not have the new view installed we were unable to find the public key for one of the recipients of the new view.  View preparation should probably be synchronized with view installation so that both aren't done in parallel.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)