brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Downer <>
Subject Re: "force resolution of localhost to be loopback, otherwise we hit problems"
Date Mon, 19 Jan 2015 10:34:31 GMT

I would guess that if the hostname/domain name are properly configured
everything should work. Unfortunately, it's easy to *not* quite
configure networking correctly.

My understanding of the canonical way to set the system hostname and
domain name is as follows:

/etc/hosts:  hostname hostname.domainname localhost
# that must be the first non-comment line

Configure the system hostname (without domainname); IIRC, on
Debian-derivatives you write it to the file /etc/hostname, and on
RedHat-derivatives there's a variable in /etc/sysconfig/network

Then either run "hostname newhostname" or "service network restart" or reboot.

Check it works:
# hostname
(returns the bare hostname)
# hostname --fqdn
(returns the hostname and DNS domainname)

On 18 January 2015 at 10:32, Sam Corbett <> wrote:
> BrooklynServiceAttributes defines the property and has a comment saying:
> /** in some cases localhost does not resolve correctly
>  * (e.g. to an interface which is defined locally but not in operation,
>  * or where multiple NICs are available and java's
> InetAddress.getLocalHost() strategy is not doing what is desired);
>  * use this to supply a specific address (e.g. "" or a specific IP
> on a specific NIC or FW)
>  */
> I guess this answers my question but it doesn't give me much assurance.
> On 18 January 2015 at 10:02, Sam Corbett <>
> wrote:
>> Hi,
>> The `brooklyn` launch script sets
>> `-Dbrooklyn.location.localhost.address=` with the cryptic
>> explanation that 'otherwise we hit problems'. Can anybody explain what
>> problems are avoided? I have a case in which I'd like the hostname of a
>> localhost location to be the hostname of the machine, but I'd also like to
>> know what will happen if I change or remove the flag.
>> Thanks,
>> Sam

View raw message