[erlang-questions] unregistering a process during takeover
Ulf Wiger
ulf@REDACTED
Fri Jan 23 18:49:11 CET 2015
Not sure based on what you’ve described. A possibility is that you’ve forgotten to start the application on b.
The next step, though, would be to also use a boot script. You could use rebar, relx, OTP systools or my personal pet project, setup [1].
Using a boot script, your applications are started automatically, or in the case of distributed apps, at least prepared to start, so that failover/takeover can work.
BR,
Ulf W
[1] http://github.com/uwiger/setup <http://github.com/uwiger/setup>
https://github.com/uwiger/setup/wiki/Example%3A-generating-boot-scripts-from-a-running-system <https://github.com/uwiger/setup/wiki/Example:-generating-boot-scripts-from-a-running-system>
> On 23 Jan 2015, at 12:09, Nuku Ameyibor <nayibor@REDACTED> wrote:
>
> hi ulf ,
> thanks.
> the takeover is working okay now !!! .
> config a is this
>
> [{kernel,
> [{distributed, [{m8ball,
> 5000,
> [a@REDACTED, {b@REDACTED, c@REDACTED}]}]},
> {sync_nodes_mandatory, [b@REDACTED, c@REDACTED]},
> {sync_nodes_timeout, 30000}
> ]
> }
> ].
>
> i start each node with
> bin\werl.exe -sname c -config C:\wamp\www\erlang\proj\m8ball\apps\m8ball_1_0_0\config\c.config
>
> there are 3 nodes .their conf files are similar with sync_nodes_mandatory being slightly different .
>
> a small question .
> the first round of failover and takeover seems to work fine .
> but after the first round (start node a,b,c . kill a b does failover .kill b c does failover . restart a,b a does takeover from c killing c application on c .i restart shell on c )
>
> after the first round when i try to do a failover onto b by killing a it doesnt work .
> was wondering how come since the first round of failover take over worked fine .
>
>
>
>
> On Fri, Jan 23, 2015 at 6:35 AM, Ulf Wiger <ulf@REDACTED <mailto:ulf@REDACTED>> wrote:
>
>> On 23 Jan 2015, at 03:44, Nuku Ameyibor <nayibor@REDACTED <mailto:nayibor@REDACTED>> wrote:
>>
>> =INFO REPORT==== 23-Jan-2015::02:20:57 ===
>> global: Name conflict terminating {m8ball_server,<2910.62.0>}
>
> This suggests that you’re connecting the nodes *after* starting your applications, so that the application processes have time to globally register themselves first. Global detects the name conflict when trying to merge the registries of the two nodes.
>
> You can for example use the ‘distributed’ option, described here:
> http://www.erlang.org/doc/apps/kernel/application.html#load-1 <http://www.erlang.org/doc/apps/kernel/application.html#load-1>
>
> and here:
>
> http://www.erlang.org/doc/man/kernel_app.html <http://www.erlang.org/doc/man/kernel_app.html>
>
> BR,
> Ulf W
>
> Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
> http://feuerlabs.com <http://feuerlabs.com/>
>
>
>
>
Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
http://feuerlabs.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150123/fd43c610/attachment.htm>
More information about the erlang-questions
mailing list