[erlang-questions] Node connection

Kirill Zaborski qrilka@REDACTED
Sat Jul 7 15:54:04 CEST 2007


For my application I have 2 applications: a slave and a master. They reside
on different nodes. Master node is always up and slave applications (and
nodes) can go offline and back online. And during slave application startup
I need to register in master application and for that I need master node to
be connected to the node where slave application runs. So I tried to do this
with
erl -eval "nte-kernel:connect_node(master_node@REDACTED
_host),aplication:start(slave_app)."
And It looks like master-node does not get connected when slave application
start and I get an error :( It look like the handshake is done
asynchronously to the net_kernel:connect_node/1.
I can solve this by pasting timer:sleep/1 between the calls but it seems to
me a bit ugly.
Is there some way to ensure that the needed node is already connected and is
accesible?

Best regards,
Kirill.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070707/6eb9fc9e/attachment.htm>


More information about the erlang-questions mailing list