[erlang-questions] unregistering a process during takeover
Nuku Ameyibor
nayibor@REDACTED
Fri Jan 23 20:58:02 CET 2015
Dear ulf ,
I used retool.config to create the release. i run the executables
created to run the application and added -c option for da various nodes .
I did start the executables on node b cuz i had sync_nodes_mandatory option
and a restart/run of app on node a requires node b and c to be running .
I also run application:info() on b and saw the application running on b
It was however not running on node c due to the takeover .
Had to create a new shell on node c .
Anyway i will try again and note u suggestions about rebar ,relx ,setup .
Thanks a lot !!!
------------------------------
From: Ulf Wiger <ulf@REDACTED>
Sent: 23/01/2015 17:49
To: Nuku Ameyibor <nayibor@REDACTED>
Cc: erlang questions <erlang-questions@REDACTED>
Subject: Re: [erlang-questions] unregistering a process during takeover
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
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> wrote:
>
> On 23 Jan 2015, at 03:44, Nuku Ameyibor <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
>
> and here:
>
> http://www.erlang.org/doc/man/kernel_app.html
>
> BR,
> Ulf W
>
> Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
> 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/569227c3/attachment.htm>
More information about the erlang-questions
mailing list