[jboss-jira] [JBoss JIRA] Commented: (JGRP-515) UDP.java requires the multicast address in the multicastsocket constructor to fix crosstalk on certain operating systems
Bela Ban (JIRA)
jira-events at lists.jboss.org
Fri Jun 8 04:03:12 EDT 2007
[ http://jira.jboss.com/jira/browse/JGRP-515?page=comments#action_12364655 ]
Bela Ban commented on JGRP-515:
-------------------------------
Well I couldn't sleep without checking on that. Seems like the kernel
guy is right and linux doesn't suck so much :)
I've hard coded mcreceive to bind to 228.8.8.8 instead of any this way:
/* construct a multicast address structure */
memset(&mc_addr, 0, sizeof(mc_addr));
mc_addr.sin_family = AF_INET;
mc_addr.sin_addr.s_addr = htonl(3825731592); /* this is int
representation of 228.8.8.8 */
mc_addr.sin_port = htons(mc_port);
After the change everything seems to be working fine:
1. 2 processes can bind to the same multicast address/join the same
multicast group
2. process will not receive any multicast messages to other groups
Interesting was to see a process binding to 228.8.8.8 and joining 228.8.8.9.
I don't know how does java do it but it has to bind to the proper
address as well join the multicast group and not just bind to any
address. I hope they didn't do it so that once bind and many times join
if a program is joining multiple groups...
Didn't read all the multicast rfc files but I guess linux is not
violating them.
It's late here and I guess I don't explain well so if you have any
questions, don't hesitate to ask me.
> UDP.java requires the multicast address in the multicastsocket constructor to fix crosstalk on certain operating systems
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: JGRP-515
> URL: http://jira.jboss.com/jira/browse/JGRP-515
> Project: JGroups
> Issue Type: Patch
> Environment: Tested on Fedora Core 6, JDK 1.5.0_10
> Reporter: ggimler
> Assigned To: Bela Ban
> Fix For: 2.5
>
> Attachments: mcreceive.c, mcsend.c, UDP.java
>
>
> I'm submitting a patch for a crosstalk issue described below.
> I'm trying to debug a problem I'm seeing when running JGroups on the
> same network/machine as another application that is sending/receiving
> data via regular multicast (not through JGroups). I'm using version
> 2.4.1-SP3. My scenario is as follows...
> JGroups send on 228.0.0.1:50000
> JGroups receive on 228.0.0.1:50000
> This works fine. When I start up another application that does
> Sends regular multicast on 228.0.0.2:50000
> Receives regular multicast on 228.0.0.2:50000
> Then the JVM with the JGroups sender/receiver complains with:
> May 15, 2007 4:47:59 PM org.jgroups.protocols.TP handleIncomingPacket
> WARNING: packet from 192.168.101.133:36594 has different version
> (26725) from ours (2.4.1). Packet is discarded
> The patch is in UDP.java:
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list