[erlang-questions] C Node Communication Over Localhost

Icarus Alive icarus.alive@REDACTED
Mon Apr 25 18:43:13 CEST 2011

On Mon, Apr 25, 2011 at 9:31 PM, John Koenig <koenigjm@REDACTED>wrote:

>  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:
> {badarg,[{erlang,list_to_existing_atom,["cnode@REDACTED
> "]},{dist_util,recv_challenge,1},{dist_util,handshake_we_started,1}]}
> 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?

Can you ping "shadow" while it is associated to the IP ?
If you've blocked ICMP echo in kernel, enable it temporarily and test.
If ping works, try to write a small program to do a reverse name-resolution
in C and see if it works.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110425/3f8a2f08/attachment.htm>

More information about the erlang-questions mailing list