[erlang-questions] unregistering a process during takeover

Nuku Ameyibor <>
Fri Jan 23 03:44:24 CET 2015


hello .
i am a bit of a noob at erlang and was having some problems and  needed
some help .
i am trying out distributed erlang and i was trying to perform a  fail-over
and takeover .
the fail over works fine but  i am  having some issues with the takeover .
i  created a release and i was able to run three nodes
a(prim.),b(sec.),c(sec.) .

the fail over works fine but the takeover gives me some errors when i try
it .

i get this error when i  try restarting the primary node however with the
application  having failed over to node b and running  well .

=INFO REPORT==== 23-Jan-2015::02:20:57 ===
global: Name conflict terminating {m8ball_server,<2910.62.0>}

=INFO REPORT==== 23-Jan-2015::02:20:57 ===
global: Name conflict terminating {m8ball_sup,<2910.61.0>}


i know its got to do with
    supervisor:start_link({global,?MODULE}, ?MODULE, []). --top level
supervisor
    gen_server:start_link({global, ?MODULE}, ?MODULE, [], []).--main gen
server
which i use in the top level supervisor and  the main genserver

i wanted to know how to use the
start_phase(Phase, StartType, PhaseArgs) and
re_register_name(Name, Pid)
 in application callback file and .app file
 to create a sort of synchronized start up procedure(code samples) or if
there is an alternate way of tackling this problem of  .

*ps:lyse .great book!!. my first foray into fp,erlang .learning a lot .*

*thanks !!*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150123/18291988/attachment.html>


More information about the erlang-questions mailing list