[jboss-jira] [JBoss JIRA] Resolved: (JGRP-615) UDP: JGroups always allocates the same ports
Bela Ban (JIRA)
jira-events at lists.jboss.org
Thu Nov 1 11:40:44 EDT 2007
[ http://jira.jboss.com/jira/browse/JGRP-615?page=all ]
Bela Ban resolved JGRP-615.
---------------------------
Resolution: Done
Okay, here's the explanation:
- On Linux, the OS always reuses the port. This is different from MacOS (tested on 10.4 Tiger) and Windows (tested on XP)
- In 2.4.x, we create a datagram socket for reception of unicast datagrams *and* a multicast socket for sending multicast datagram
packets.
- In 2.5 and later, we removed the multicast send socket, so we need 1 less port compared to 2.4
- Linux apparently remembers the last (highest) open port, so in 2.4 if we have port 10000 for the unicast socket and 10001 for
the multicast socket, then the next time we start we'll get 10001 for the unicast and 10002 for the multicast port
- With 2.5 and 2.6, we only have 1 port open (10001), so next time around we'll also get 10001.
Solution I: leaves as is, this is not incorrect behavior
Solution II: while it is not incorrect behavior, we could get into reincarnation issues (JGRP-130/129). To get around this, we could simply open a temporary DatagramSocket *before* the unicast socket is created, then close is *after* creation of the unicast socket. Kludgey, but works
> UDP: JGroups always allocates the same ports
> --------------------------------------------
>
> Key: JGRP-615
> URL: http://jira.jboss.com/jira/browse/JGRP-615
> Project: JGroups
> Issue Type: Task
> Reporter: Bela Ban
> Assigned To: Bela Ban
> Priority: Minor
> Fix For: 2.5.2, 2.6
>
>
> In 2.5 and 2.6, JGroups always allocates the same ports with UDP and no bind_port set. This is different from 2.4, where different (increasing) ports were used.
> Investigate why this is the case, and what changed between 2.4 and 2.5.
> This doesn't happen on Windows and macOS, just on Linux.
--
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