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

ASF GitHub Bot commented on GEODE-8664:
---------------------------------------

jdeppe-pivotal commented on a change in pull request #5725:
URL: https://github.com/apache/geode/pull/5725#discussion_r521485764



##########
File path: 
geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionImpl.java
##########
@@ -181,9 +181,9 @@ public void start() {
       throw new GemFireSecurityException(e.getMessage(),
           e);
     } catch (MembershipConfigurationException e) {
-      throw new GemFireConfigException(e.getMessage());
+      throw new GemFireConfigException(e.getMessage(), e.getCause());

Review comment:
       You should just use the exception here instead of `e.getCause()` 
otherwise you're discarding one of the stack frames in the exception chain.

##########
File path: 
geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionImpl.java
##########
@@ -181,9 +181,9 @@ public void start() {
       throw new GemFireSecurityException(e.getMessage(),
           e);
     } catch (MembershipConfigurationException e) {
-      throw new GemFireConfigException(e.getMessage());
+      throw new GemFireConfigException(e.getMessage(), e.getCause());
     } catch (MemberStartupException e) {
-      throw new SystemConnectException(e.getMessage());
+      throw new SystemConnectException(e.getMessage(), e.getCause());

Review comment:
       Ditto




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> JGroups exception is not propagated
> -----------------------------------
>
>                 Key: GEODE-8664
>                 URL: https://issues.apache.org/jira/browse/GEODE-8664
>             Project: Geode
>          Issue Type: Bug
>          Components: membership, messaging
>    Affects Versions: 1.12.0, 1.13.0
>            Reporter: Mario Salazar de Torres
>            Assignee: Mario Salazar de Torres
>            Priority: Minor
>              Labels: pull-request-available
>         Attachments: GEODE-8664.patch
>
>
> *AS A* geode contributor
> *I WANT* exceptions thrown in DistributionImpl.start to be propagated
> *SO THAT* more information is provided while tackling issues.
>  
> ----
> *Additional information:*
> After looking at an issue while starting a locator having to do with 
> JGroupMessenger I noticed that exceptions from Membership.start are not 
> correctly propagated in DistributionImpl.start method.
> To ilustrate the problem I attach below the reported exception while starting 
> the locator:
>  
> {noformat}
> locator is exiting due to an exception
> org.apache.geode.GemFireConfigException: unable to create jgroups channel
> at 
> org.apache.geode.distributed.internal.DistributionImpl.start(DistributionImpl.java:184)
> at 
> org.apache.geode.distributed.internal.DistributionImpl.createDistribution(DistributionImpl.java:222)
> at 
> org.apache.geode.distributed.internal.ClusterDistributionManager.<init>(ClusterDistributionManager.java:464)
> at 
> org.apache.geode.distributed.internal.ClusterDistributionManager.<init>(ClusterDistributionManager.java:497)
> at 
> org.apache.geode.distributed.internal.ClusterDistributionManager.create(ClusterDistributionManager.java:326)
> at 
> org.apache.geode.distributed.internal.InternalDistributedSystem.initialize(InternalDistributedSystem.java:779)
> at 
> org.apache.geode.distributed.internal.InternalDistributedSystem.access$200(InternalDistributedSystem.java:135)
> at 
> org.apache.geode.distributed.internal.InternalDistributedSystem$Builder.build(InternalDistributedSystem.java:3033)
> at 
> org.apache.geode.distributed.internal.InternalDistributedSystem.connectInternal(InternalDistributedSystem.java:290)
> at 
> org.apache.geode.distributed.internal.InternalLocator.startDistributedSystem(InternalLocator.java:743)
> at 
> org.apache.geode.distributed.internal.InternalLocator.startLocator(InternalLocator.java:388)
> at 
> org.apache.geode.distributed.LocatorLauncher.start(LocatorLauncher.java:716)
> at org.apache.geode.distributed.LocatorLauncher.run(LocatorLauncher.java:623)
> at 
> org.apache.geode.distributed.LocatorLauncher.main(LocatorLauncher.java:217){noformat}
>  
> Thing is with that kind of information there's no way to know why the problem 
> is happening, so the idea would be to propagate the exceptions, so it looks 
> more like this:
> {noformat}
> locator is exiting due to an exception
> org.apache.geode.SystemConnectException: unable to create jgroups channel
> at 
> org.apache.geode.distributed.internal.DistributionImpl.start(DistributionImpl.java:186)
> at 
> org.apache.geode.distributed.internal.DistributionImpl.createDistribution(DistributionImpl.java:222)
> at 
> org.apache.geode.distributed.internal.ClusterDistributionManager.<init>(ClusterDistributionManager.java:464)
> at 
> org.apache.geode.distributed.internal.ClusterDistributionManager.<init>(ClusterDistributionManager.java:497)
> at 
> org.apache.geode.distributed.internal.ClusterDistributionManager.create(ClusterDistributionManager.java:326)
> at 
> org.apache.geode.distributed.internal.InternalDistributedSystem.initialize(InternalDistributedSystem.java:779)
> at 
> org.apache.geode.distributed.internal.InternalDistributedSystem.access$200(InternalDistributedSystem.java:135)
> at 
> org.apache.geode.distributed.internal.InternalDistributedSystem$Builder.build(InternalDistributedSystem.java:3034)
> at 
> org.apache.geode.distributed.internal.InternalDistributedSystem.connectInternal(InternalDistributedSystem.java:290)
> at 
> org.apache.geode.distributed.internal.InternalLocator.startDistributedSystem(InternalLocator.java:743)
> at 
> org.apache.geode.distributed.internal.InternalLocator.startLocator(InternalLocator.java:388)
> at 
> org.apache.geode.distributed.LocatorLauncher.start(LocatorLauncher.java:716)
> at org.apache.geode.distributed.LocatorLauncher.run(LocatorLauncher.java:623)
> at org.apache.geode.distributed.LocatorLauncher.main(LocatorLauncher.java:217)
> Caused by: java.lang.Exception: failed to open a port in range 53-53
> at org.jgroups.protocols.UDP.createMulticastSocketWithBindPort(UDP.java:503)
> at org.jgroups.protocols.UDP.createSockets(UDP.java:348)
> at org.jgroups.protocols.UDP.start(UDP.java:266)
> at org.jgroups.stack.ProtocolStack.startStack(ProtocolStack.java:966)
> at org.jgroups.JChannel.startStack(JChannel.java:889)
> at org.jgroups.JChannel._preConnect(JChannel.java:553)
> at org.jgroups.JChannel.connect(JChannel.java:288)
> at org.jgroups.JChannel.connect(JChannel.java:279)
> at 
> org.apache.geode.distributed.internal.membership.gms.messenger.JGroupsMessenger.start(JGroupsMessenger.java:393)
> at 
> org.apache.geode.distributed.internal.membership.gms.Services.start(Services.java:203)
> at 
> org.apache.geode.distributed.internal.membership.gms.GMSMembership.start(GMSMembership.java:1853)
> at 
> org.apache.geode.distributed.internal.DistributionImpl.start(DistributionImpl.java:171)
> ... 13 more{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to