<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
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):<br>
<br>
1) Start an erlang VM (thus starting empd in the process): erl
-sname test@localhost -setcookie dev<br>
<br>
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<br>
<br>
3) Attempt to send a message from erlang to C Node: {any,
cnode@localhost} ! {call, self(), {echo}}.<br>
<br>
Step 3 results in the following error:<br>
<blockquote>Error in process <0.43.0> on node 'test@localhost'
with exit value:
{badarg,[{erlang,list_to_existing_atom,["cnode@shadow"]},{dist_util,recv_challenge,1},{dist_util,handshake_we_started,1}]}<br>
</blockquote>
My /etc/hosts file contains:<br>
<blockquote>127.0.0.1 localhost<br>
127.0.1.1 shadow<br>
<br>
# The following lines are desirable for IPv6 capable hosts<br>
::1 ip6-localhost ip6-loopback<br>
fe00::0 ip6-localnet<br>
ff00::0 ip6-mcastprefix<br>
ff02::1 ip6-allnodes<br>
ff02::2 ip6-allrouters<br>
</blockquote>
If I change the 127.0.0.1 entry to "127.0.0.1 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?<br>
<br>
Thanks in advance,<br>
<br>
John<br>
</body>
</html>