Reputation: 27196
Trying to get two erlang nodes talking to each other : one on a Ubuntu machine and one on Windows XP.
We're getting a "Connection attempt from disallowed node" message which prevents one node receiving messages from the other.
They're both using 5.XXX versions of Erlang OTP.
Both nodes have the same cookie ( .erlang.cookie)
We are starting the receiver node with :
erl -name fred@ipaddress
and calling the function on it with 'fred@ipaddress' (in single quotes)
We've turned firewalls off.
So what else may be preventing the connection?
Update : we're using erlang:get_cookie() to check the cookie on both nodes, and the values are different. So is this the problem. We think we're setting the cookie by putting the same .erlang.cookie file in the directory where we run erlang on both machines. But maybe this is the wrong place?
Update 2 : thanks for the answers everyone. We chose Ranok's as our answer because it worked well for us. I'm sure some of the alternative ways of setting the cookie would be fine too.
Upvotes: 16
Views: 9257
Reputation: 121
erlang:set_cookie(node(), 'newcookie').
not
erlang:set_cookie(node(), "newcookie").
Upvotes: 2
Reputation: 17755
net_adm:ping()
try net_adm:ping() from both nodes.
http://www.erlang.org/documentation/doc-5.4.13/lib/kernel-2.10.13/doc/html/net_adm.html
Upvotes: 2
Reputation: 5412
The Erlang cookie should be in the users directory. Not the application directory.
So yours is something like:
C:\Documents and Settings\InterstarUser\.erlang.cookie
You can see the location of HOME with the command env
in the command line if I remember correctly from my Windows days.
Upvotes: 3
Reputation: 21
Also, when you start the Erlang system, there is a commandline flag -setcookie
which will let you specify the cookie at start time.
erl -name fred@ipaddress -setcookie FOOBAR
Hope that helps, Jacob
Upvotes: 12
Reputation: 1508
Start off by checking each node's cookie. From the shell:
erlang:get_cookie().
If they are not the same, then change one of the node's cookies to match the other:
erlang:set_cookie(node(), "newcookie").
If everything works you need to see why the cookie setting is not being picked from the config file or command line arg.
Upvotes: 5
Reputation: 1152
A couple of things come to mind:
Upvotes: 1