[ 
https://forge.continuent.org/jira/browse/SEQUOIA-366?page=comments#action_14310 
] 

Stefan Lischke commented on SEQUOIA-366:
----------------------------------------

can we focus again on this bug, its really PITA, when sequoia does not run if 
the hostname is not on the same line of the sequoia hostname in etc/hosts 

> get rid of InetAddress.getLocalHost()
> -------------------------------------
>
>          Key: SEQUOIA-366
>          URL: https://forge.continuent.org/jira/browse/SEQUOIA-366
>      Project: Sequoia
>         Type: Improvement

>     Versions: Sequoia 2.1, Sequoia 2.6, Version 2.2, Sequoia 2.3, Sequoia 
> 2.7, Sequoia 2.5, Sequoia 2.4, Sequoia 2.6.1
>     Reporter: Marc Herbert
>     Assignee: Marc Herbert
>     Priority: Minor
>      Fix For: Sequoia 3.0 beta3

>
>
> InetAddress.getLocalHost() is a PITA, we should get rid of it.
> See <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4665037>
> It's ambiguous
> - does it help me connect to myself? or does it help OTHERS connect to myself?
> - what happens when there is no naming system or when it is down?
> - what does it return when there are several network interfaces?
> It's a recurrent cause of support issues on most linux distributions
> because of their /etc/hosts, see
> <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4665037>
> It's generally wasting our time, see SEQUOIA-102 and SEQUOIA-129 for
> instance.
> It can be replaced by the following alternatives:
> - InetAddress.getByName(null) gets a loopback address (a good default in most 
> cases)
> - read addresses from configuration files (like hedera.properties for 
> instance)
> - list all network interfaces and pick up a (non-loopback) one using
>   NetworkInterfaces.getNetworkInterfaces(). See sample code in sun 
> bugdatabase above
> Granted, most of these alternatives require more code and thinking
> than just throwing "getLocalAddress()" at the issue.
> That's just because those problems ARE intrinsically complex, and that
> InetAddress.getLocalHost() (the "swiss-army knife" network solution)
> is too complex and FAILS miserably to hide this complexity and to solve
> many _different_ problems at once.

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

_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to