New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http agent - Allow to graceful ignore if discovery cannot start discovery multicast #135

Closed
davsclaus opened this Issue Mar 29, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@davsclaus

davsclaus commented Mar 29, 2014

See
https://issues.apache.org/jira/browse/AMQ-5124

It would be good if there was an option you could turn on to graceful ignore if multicast discovery cannot be started. And maybe just log a INFO without that stracktrace, if it cannot be started but it's ignored.

For example with a new parameter

     <init-param>
       <param-name>discoveryIgnoreFailureOnStarup</param-name>
     <param-value>true</param-value>
     </init-param>
@rhuss

This comment has been minimized.

Owner

rhuss commented Mar 31, 2014

I tried to be defensive for the multicast stuff anyways (considering it as an non-super-critical 'addon'), but it probably wasn't enough:

if (NetworkUtil.isMulticastSupported(n)) {
   pSocket.joinGroup(pSocketAddress, n);
}

public static boolean isMulticastSupported(NetworkInterface pNif) {
    return pNif != null && checkMethod(pNif, isUp) && 
        checkMethod(pNif, supportsMulticast);
}

etc ...

I will catch the exception here, probably logging (if a logger is not to far away at this point) it as a warning (with better context info).

Will be fixed in 1.2.1.

@rhuss rhuss added this to the 1.2.1 milestone Mar 31, 2014

@rhuss rhuss closed this in 06403b2 Mar 31, 2014

@rhuss rhuss modified the milestone: 1.2.1 Mar 31, 2014

rhuss added a commit that referenced this issue Apr 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment