[erlang-questions] CNodes, FQDNs, and -name

Mikael Magnusson mikma264@REDACTED
Thu Aug 12 08:08:15 CEST 2010


On Wed, 2010-08-11 at 18:04 -0700, James Aimonetti wrote:
> How does the Erlang VM determine the FQDN when started with the -name
> option? In my bash shell, hostname and hostname -f both return the
> shortname of my laptop. I'm using the mod_erlang_event module for
> freeSWITCH and even though I've set using sname to false, the module
> registers the shortname (I think it uses the hostname call internally
> to figure out what the node will be named) and my Erlang VM cannot
> communicate with it.
> 
> I read about inet_res (http://erldocs.com/R14A/kernel/inet_res.html)
> and it looks like the VM might read from /etc/resolv.conf? I do have
> "domain mydomain.org" in that file so its not surprising that the VM
> picks it up (if that's even the mechanism by which the VM figures out
> the domain). So, in the mod_erlang_event C code, how would I be able
> to mimic the way the VM has figured out the longname of my laptop? (I
> do not have a DNS entry for the laptop at this domain).
> 

You should make sure that the first name listed for your IP address
in /etc/hosts is the FQDN. That should fix the problem with hostname -f
not giving you the FQDN.

/Mikael



More information about the erlang-questions mailing list