Distributed Applications

Ulf Wiger <>
Mon Dec 2 14:49:23 CET 2002


On Mon, 2 Dec 2002, hfventer wrote:

>>For receiving takeover|failover application must be configured with
>start_phases
>>parameter.
>
>Thank you for the help, but I stil have no joy with this.
>I can see that the nodes each run through the start phases.
>Node 1 and node 2 both start the distributed application
>locally with no takeover.  It seems that after I start the
>erlang node up, it does not know of the other node yet.
>If I use net_kernel:connect() no actions are taken
>to move the application to the appropriate node.

Just to make sure: when you call nodes() in either of the
nodes, can you actually see the name of the other node in
the list?

That is, on , nodes() should yield [], and
on , it should be []. If you get [], then
the nodes are not able to talk to each other.

Then it would be time to look at cookies, for example. Do
they have the same cookie (e.g. via erl -sname n1
-setcookie mycookie)?


BTW, normally, you wouldn't use net_kernel:connect(Node).
The most common method is net_adm:ping(Node). There's
nothing wrong with using net_kernel:connect/1, though. It
works perfectly (does it actually return 'true' when you try
it?)

>Do I need to use node_sync_mandatory to force the nodes to
>wait for each other?

No, the only difference between sync_nodes_mandatory and
sync_nodes_optional is that with ..._mandatory, the nodes
will wait forever for each other, and with ..._optional,
they will wait for the specified time, and then continue in
"single mode".


>Or do I need to start more apps up
>than kernel and stdlib to get distributed behavior?

No, that should not be necessary. Running sasl is a good
idea for better error reporting, but you seem to be running
that already. It doesn't affect the distribution problem,
though.


/Uffe
-- 
Ulf Wiger, Senior Specialist,
   / / /   Architecture & Design of Carrier-Class Software
  / / /    Strategic Product & System Management
 / / /     Ericsson Telecom AB, ATM Multiservice Networks






More information about the erlang-questions mailing list