Bug 43641 - Using the bind attribute for Membership tag causes Multicast to break
Summary: Using the bind attribute for Membership tag causes Multicast to break
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Cluster (show other bugs)
Version: 6.0.14
Hardware: All All
: P3 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
: 46935 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-17 07:58 UTC by Ruediger Pluem
Modified: 2009-03-30 05:30 UTC (History)
1 user (show)



Attachments
Patch against 6.0.14 (1.70 KB, patch)
2007-10-17 07:59 UTC, Ruediger Pluem
Details | Diff
Formatted patch (1.68 KB, patch)
2007-10-17 10:58 UTC, Filip Hanik
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ruediger Pluem 2007-10-17 07:58:51 UTC
Using the bind attribute for the Membership tag causes multicast to break. So
something like

   <Membership className="org.apache.catalina.tribes.membership.McastService"
               bind="123.123.123.123"
               address="228.0.0.4"
               port="45564"/>

causes a broken cluster.
The reason for this is that in the case that the bind parameter is set the 
MulticastSocket is bound to the multicast interface. This is wrong as it causes
the respective udp socket to be bound to this interface which stops multicast
from working (tested on Linux and Solaris). It can be tried to bind the
MulticastSocket to the multicast address itself. This does not work on all
platforms. In case it does not work it can be ignored silently and the
MulticastSocket only binds to the port. The attached patch fixes this.
Comment 1 Ruediger Pluem 2007-10-17 07:59:25 UTC
Created attachment 20995 [details]
Patch against 6.0.14
Comment 2 Filip Hanik 2007-10-17 10:58:54 UTC
Created attachment 20999 [details]
Formatted patch
Comment 3 Peter Rossbach 2007-10-17 11:12:28 UTC
OK, can we please add if(log.isInfoEnabled) before the log statements.

I think also the after Exception the log level is warn and not info! User has create
a wrong configuration !

:-)
Peter
Comment 4 Filip Hanik 2007-10-17 11:23:13 UTC
(In reply to comment #3)
> OK, can we please add if(log.isInfoEnabled) before the log statements.
> 
no need, this is not a frequently called method

> I think also the after Exception the log level is warn and not info! User has
create
> a wrong configuration !
not at all, it is simple that on some OS' don't support binding to the multicast
address, and the bind exception is expected.


> 
> :-)
> Peter

Comment 5 Rainer Jung 2009-03-30 05:29:24 UTC
*** Bug 46935 has been marked as a duplicate of this bug. ***
Comment 6 Rainer Jung 2009-03-30 05:30:47 UTC
Proposed for backport to TC 5.5.x.