[erlang-questions] C Node Communication Over Localhost

John Koenig koenigjm@REDACTED
Mon Apr 25 18:01:39 CEST 2011

I have experienced an issue on newer versions of Ubuntu Desktop (10.04 
and later) when trying to send messages from an erlang VM to a C node 
which is using ei.  My procedure is as follows (shadow is the hostname 
of the machine I am currently testing on):

1) Start an erlang VM (thus starting empd in the process):  erl -sname 
test@REDACTED -setcookie dev

2) Start the C node, in this case the C node will bind to 
localhost:30000 with a published name of "cnode" using "dev" as its 
secret cookie:  ./my_cnode -P 30000 -N cnode -S dev

3) Attempt to send a message from erlang to C Node: {any, 
cnode@REDACTED} ! {call, self(), {echo}}.

Step 3 results in the following error:

    Error in process <0.43.0> on node 'test@REDACTED' with exit value:

My /etc/hosts file contains:       localhost       shadow

    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters

If I change the entry to " localhost shadow" and 
comment out the second line, then communication between the VM and C 
node succeeds.  What is happening here?  Is there a way to achieve 
communication over localhost without having to change /etc/hosts?

Thanks in advance,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110425/a6aef9c9/attachment.htm>

More information about the erlang-questions mailing list