tags:

views:

113

answers:

3

Hi,

I am new to Erlang and trying to set two nodes on my laptop.

In one terminal I type:

eli@elimayost: ~/erlang_apps> erl -sname foo -setcookie secret

And in the second terminal:

eli@elimayost: ~/erlang_apps> erl -sname bar -setcookie secret

If I use the first terminal to ping the second:

(foo@elimayost)1> net_adm:ping(bar@elimayost).

I get a pang response (same response if I use the second term to ping the first term).

Any idea why?

A: 

Try starting the nodes like this:

eli@elimayost: ~/erlang_apps> erl -sname foo@elimayost -setcookie secret
eli@elimayost: ~/erlang_apps> erl -sname bar@elimayost -setcookie secret

Then ping them like you did before.

(foo@elimayost)1> net_adm:ping(bar@elimayost).

If that doesn't work for you, try pinging the node from itself.

mjcopple
Also look at:http://stackoverflow.com/questions/2136918/getting-two-erl-shells-to-talk
mjcopple
A: 

mjcopple:

Thanks for your answer.

I started the nodes as you suggested. Still they can not see each other.

I can ping both nodes from within the node but not from the other node.

I am trying it on OpenSUSE 11.3. When trying on Ubuntu 10.04 it works fine.

Both machines are virtual machines running under Virtual Box.

elimayost
A: 

Did You check the syslog for errors?

Is apparmor active? Maybe turn it off and try again. One day I had very strange effects with apparmor running... but it is just a guess.

bsmr