[erlang-questions] Different hostname from erl -sname and inet:gethostname()
Mon Sep 26 11:58:02 CEST 2011
On Mon, Sep 26, 2011 at 02:14:40AM +0200, Magnus Klaar wrote:
> In hindsight, i missed your last question. If you do want pufpuf to be the
> name for 127.0.0.1 you can place it at the head of the list of names
> associated with an address in your hosts file.
> 127.0.0.1 pufpuf localhost.localdomain localhost
> ::1 pufpuf localhost.localdomain localhost
On a local network other machines may resolve 'pufpuf' to its external
interface address, but 'pufpuf' itself resolves then name to the
loopback address. This discrapancy can confuse NFS, automounter, etc...
For the sake of Erlang/OTP you do not need to put the short hostname
on the loopback address; if inet:gethostbyname fails to resolve
the short hostname it will fall back to using the loopback address.
> erlang-questions mailing list
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the erlang-questions