<div dir="ltr"><span class="im" style="font-size:13px"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">When did you run application:info() on b and saw the application running there? Was it after killing a?</blockquote></span><div style="font-size:13px">    i run that function on node b after restarting  node node a and making it takeover from the failover node b.</div><div style="font-size:13px">    and i make a mistake it wasn't running on node b but on node a .</div><span class="im" style="font-size:13px"><div><br></div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">To be clear, your config says the application should failover to *either* b or c.</blockquote></div></span><div style="font-size:13px">   yes true and that is what happens .</div><div style="font-size:13px"><br></div><div style="font-size:13px">  but how do errors during restarts affect the distribution  mechanism .</div><div style="font-size:13px">  for instance how do global name clashes affect the distribution mechanism .</div><div style="font-size:13px">  i got this error during takeover but the takeover still happened </div><div style="font-size:13px"> thanks !!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 24, 2015 at 12:53 PM, Nuku Ameyibor <span dir="ltr"><<a href="mailto:nayibor@gmail.com" target="_blank">nayibor@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex" class="gmail_quote">When did you run application:info() on b and saw the application running there? Was it after killing a?</blockquote></div></span><div>    i run that function on node b after restarting  node node a and making it takeover from the failover node b.</div><div>    and i make a mistake it wasn't running on node b but on node a .</div><span class=""><div><div><br></div></div><div><br></div><div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex" class="gmail_quote">To be clear, your config says the application should failover to *either* b or c.</blockquote></div></span><div>   yes true and that is what happens .</div><div><br></div><div>  but how do errors during restarts affect the distribution  mechanism .</div><div>  for instance how do global name clashes affect the distribution mechanism .</div><div>  i got this error during takeover but the takeover still happened </div><div> thanks !!</div><div> </div><div>    </div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 23, 2015 at 9:30 PM, Ulf Wiger <span dir="ltr"><<a href="mailto:ulf@feuerlabs.com" target="_blank">ulf@feuerlabs.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>My comment about the boot script was just because I didn’t see a -boot option in your command line.</div><div><br></div><div>When did you run application:info() on b and saw the application running there? Was it after killing a?</div><div><br></div><div>To be clear, your config says the application should failover to *either* b or c.</div><div><br></div><div>BR,</div><div>Ulf W</div><div><div><div><br></div><br><div><blockquote type="cite"><div>On 23 Jan 2015, at 20:58, Nuku Ameyibor <<a href="mailto:nayibor@gmail.com" target="_blank">nayibor@gmail.com</a>> wrote:</div><br><div>

<div>
<div>
<div style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif"><br><br>Dear ulf ,<br><br>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 . <br>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 . <br>I also run application:info() on b and saw the application running on b <br>It was however not running on node c due to the takeover .<br>Had to create a new shell on node c . <br><br>Anyway i will try again and  note u suggestions  about rebar ,relx ,setup .<br>Thanks a lot !!!</div></div>
<div dir="ltr">
<hr>
<span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif;FONT-WEIGHT:bold">From: </span><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif"><a href="mailto:ulf@feuerlabs.com" target="_blank">Ulf Wiger</a></span><br><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif;FONT-WEIGHT:bold">Sent: </span><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif">‎23/‎01/‎2015 17:49</span><br><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif;FONT-WEIGHT:bold">To: </span><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif"><a href="mailto:nayibor@gmail.com" target="_blank">Nuku Ameyibor</a></span><br><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif;FONT-WEIGHT:bold">Cc: </span><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif"><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang questions</a></span><br><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif;FONT-WEIGHT:bold">Subject: </span><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif">Re: [erlang-questions] unregistering a process during takeover</span><br><br></div></div><div style="word-wrap:break-word"><div>Not sure based on what you’ve described. A possibility is that you’ve forgotten to start the application on b.</div><div><br></div><div>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].</div><div><br></div><div>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.</div><div><br></div><div>BR,</div><div>Ulf W</div><div><br></div><div>[1] <a href="http://github.com/uwiger/setup" target="_blank">http://github.com/uwiger/setup</a></div><div>    <a href="https://github.com/uwiger/setup/wiki/Example:-generating-boot-scripts-from-a-running-system" target="_blank">https://github.com/uwiger/setup/wiki/Example%3A-generating-boot-scripts-from-a-running-system</a></div><div><br></div><br><div><blockquote type="cite"><div>On 23 Jan 2015, at 12:09, Nuku Ameyibor <<a href="mailto:nayibor@gmail.com" target="_blank">nayibor@gmail.com</a>> wrote:</div><br><div><div dir="ltr">hi ulf ,<div>thanks.</div><div>the takeover is working okay now  !!! .</div><div>config a is this </div><div><br></div><div><div>[{kernel,</div><div>  [{distributed, [{m8ball,</div><div>                   5000,</div><div>                  [a@ZION, {b@ZION, c@ZION}]}]},</div><div>   {sync_nodes_mandatory, [b@ZION, c@ZION]},</div><div>   {sync_nodes_timeout, 30000}</div><div>  ]</div><div> }</div><div>].</div></div><div><br></div><div>i start each node with  </div><div>bin\werl.exe -sname c -config C:\wamp\www\erlang\proj\m8ball\apps\m8ball_1_0_0\config\c.config<br></div><div><br></div><div>there are 3 nodes .their conf files are similar with sync_nodes_mandatory being slightly different .</div><div><br></div><div>a small question .</div><div>the first round of  failover and takeover seems to work fine .</div><div>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  )</div><div><br></div><div><b> after the first round when  i try to do a failover   onto b by killing a it doesnt work .</b></div><div>was wondering how come since the first round of failover take over worked fine .</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 23, 2015 at 6:35 AM, Ulf Wiger <span dir="ltr"><<a href="mailto:ulf@feuerlabs.com" target="_blank">ulf@feuerlabs.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span><br><div><blockquote type="cite"><div>On 23 Jan 2015, at 03:44, Nuku Ameyibor <<a href="mailto:nayibor@gmail.com" target="_blank">nayibor@gmail.com</a>> wrote:</div><br><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">=INFO REPORT==== 23-Jan-2015::02:20:57 ===</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">global: Name conflict terminating {m8ball_server,<2910.62.0>}</div></div></blockquote><br></div></span><div>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.</div><div><br></div><div>You can for example use the ‘distributed’ option, described here:</div><div><a href="http://www.erlang.org/doc/apps/kernel/application.html#load-1" target="_blank">http://www.erlang.org/doc/apps/kernel/application.html#load-1</a></div><div><br></div><div>and here:</div><div><br></div><div><a href="http://www.erlang.org/doc/man/kernel_app.html" target="_blank">http://www.erlang.org/doc/man/kernel_app.html</a></div><div><br></div><div>BR,</div><div>Ulf W</div><br><div>
<span style="border-collapse:separate;border-spacing:0px"><div><div>Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.</div><div><a href="http://feuerlabs.com/" target="_blank">http://feuerlabs.com</a></div></div><div><br></div></span><br>

</div>
<br></div></blockquote></div><br></div>
</div></blockquote></div><br><div>
<span style="border-collapse:separate;border-spacing:0px"><div><div>Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.</div><div><a href="http://feuerlabs.com/" target="_blank">http://feuerlabs.com</a></div></div><div><br></div></span><br>

</div>
<br></div>
</div></blockquote></div><br><div>
<span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div><div>Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.</div><div><a href="http://feuerlabs.com" target="_blank">http://feuerlabs.com</a></div></div><div><br></div></span><br>

</div>
<br></div></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>