Beginner help with distributed Erlang

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Beginner help with distributed Erlang

Alex Peake
I am just starting to try distributed Erlang.

I am in the Windows 2000 world. I have two machines in a domain (FEY).

On machine 1 (the server) called predator I start Erlang:
erl -name predator
I get:
(predator)1>

So far so good (I think).

On machine 2 (the client) called functional I start Erlang:
werl -name functional
I get:
(functional)1>

OK so far (I think).

I try:
net_adm:names(predator).
and get:
{ok,[{"predator",4888}]}

which I think is OK (4888 is what I get over on predator for net_adm:names().


Now when I try from functional:
net_adm:ping('predator').
I get pang, and I see on the predator screen:
** Connection attempt from disallowed node 'functional'

I tried the sample banking example from the book (chapter 6) and of course receive similar
responses.

I tried (on the server):
net_kernel:allow('functional').
and get:
ok

However, I still get the same:
** Connection attempt from disallowed node 'functional'

Can someone help me please? What am I missing?

Alex




Reply | Threaded
Open this post in threaded view
|

Beginner help with distributed Erlang

Thomas Lange
You have to set a cookie for each node to be
able to use the erlang distibution.

-setcookie My_cookie

Of course, the cookie should be the same on
both nodes ;-)

/Thomas

Alex Peake wrote:

>
> I am just starting to try distributed Erlang.
>
> I am in the Windows 2000 world. I have two machines in a domain (FEY).
>
> On machine 1 (the server) called predator I start Erlang:
> erl -name predator
> I get:
> (predator)1>
>
> So far so good (I think).
>
> On machine 2 (the client) called functional I start Erlang:
> werl -name functional
> I get:
> (functional)1>
>
> OK so far (I think).
>
> I try:
> net_adm:names(predator).
> and get:
> {ok,[{"predator",4888}]}
>
> which I think is OK (4888 is what I get over on predator for net_adm:names().
>
> Now when I try from functional:
> net_adm:ping('predator').
> I get pang, and I see on the predator screen:
> ** Connection attempt from disallowed node 'functional'
>
> I tried the sample banking example from the book (chapter 6) and of course receive similar
> responses.
>
> I tried (on the server):
> net_kernel:allow('functional').
> and get:
> ok
>
> However, I still get the same:
> ** Connection attempt from disallowed node 'functional'
>
> Can someone help me please? What am I missing?
>
> Alex