[jboss-jira] [JBoss JIRA] Resolved: (JGRP-739) check all bind_address against NetworkInterface.getByInetAddress() to see if it exists on the machine

Vladimir Blagojevic (JIRA) jira-events at lists.jboss.org
Wed Jul 16 10:34:29 EDT 2008


     [ https://jira.jboss.org/jira/browse/JGRP-739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladimir Blagojevic resolved JGRP-739.
--------------------------------------

    Resolution: Done


Resolved on HEAD (2.7)

  Revision  Changes    Path
  1.155     +7 -1      JGroups/src/org/jgroups/util/Util.java

> check all bind_address against NetworkInterface.getByInetAddress() to see if it exists on the machine
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JGRP-739
>                 URL: https://jira.jboss.org/jira/browse/JGRP-739
>             Project: JGroups
>          Issue Type: Feature Request
>            Reporter: Michael Newcomb
>            Assignee: Vladimir Blagojevic
>            Priority: Minor
>             Fix For: 2.7
>
>
> Could you add a check in Util.getBindAddress() that checks the bind_addr against NetworkInterface.getByInetAddress() and throws some sort of exception if no NetworkInterface is returned?
> I set my bind_addr via a database parameter and if the user mistakenly assigns the wrong bind address, it doesn't show up until UDP.createEphemeralDatagramSocket() when the localPort goes over 65535 because each attempt to create a DatagramSocket with the inet address that is not a local address throws a SocketException (actually a BindException) which is caught but ignored. When localPort finally goes over 65535 it throws an IllegalArgumentException.
> So, a check in Util.getBindAddress() to see if the bind_addr is even available on the machine would lead to a failure in the configuration stage (setProperties).
> As a side question, doesn't creating a DatagramSocket with port=0 guarantee an ephemeral port? Is it necessary to 'scan' for one? Perhaps a failure from the initial attempt with port=0 would wait a few ms and then try again with port=0?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list