CNodes, FQDNs, and -name

James Aimonetti james.aimonetti@REDACTED
Thu Aug 12 03:04:03 CEST 2010


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).

I read http://www.erlang.org/doc/tutorial/cnode.html and it looked
like the examples had the long name hardcoded into the C
ei_connect_xinit().

Sorry if this doesn't make sense; this is my first foray into
interacting with a Cnode.

James


More information about the erlang-questions mailing list