<div dir="ltr">Hi Arun,<div><br></div><div>You can start your erlang node with an explicit name such as scu_plus@localhost or scu_plus@hostname which will prevent it from crashing whenever the IP address changes. If you are using something like relx to build your release, then you should be able to specify the node name in the $ROOTDIR/releases/<VSN>/vm.args file.</div><div><br></div><div>cheers,</div><div>Chandru</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 14 December 2016 at 11:18, Arun <span dir="ltr"><<a href="mailto:arunp@utl.in" target="_blank">arunp@utl.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
I am facing some serious issues with mnesia database. We have an
erlang application using mnesia database as back-end. The
application runs on the hardware and the IP address of the hardware
will be changing based on its connectivity and so the erlang node
name. Some times as soon as the node changes am getting an error log
as given below and the VM restarts repeatedly. But if I delete the
mnesia related files and restart again, application runs smoothly.
For me data reliability and persistence are the prime concern so I
can not go with the above mentioned method. Can somebody kindly
assist me how to resolve this issue with out deleting mnesia schema.<br>
<br>
<div class="m_1377135140050706092moz-text-plain" style="font-family:-moz-fixed;font-size:12px" lang="x-unicode">
<pre>Current working directory:/root/rel-3/galaxy/<wbr>lib/galaxy-1.0.0/priv
Release number as string:3
PHY: mdio@24520:01 - Link is Up - 100/Full
36524 01999.282 2001391.0 71.4 532699753591315.4 11871.3 0
Exec: /usr/lib/erlang/erts-8.0/bin/<wbr>erlexec -boot /root/rel-3/galaxy/releases/0.<wbr>0.1/galaxy -mode embedded -boot_var ERTS_LIB_DIR /usr/lib/erlang/erts-8.0/../<wbr>lib -config /root/rel-3/galaxy/releases/0.<wbr>0.1/sys.config -args_file /root/rel-3/galaxy/vm.args -- console
Root: /root/rel-3/galaxy
/root/rel-3/galaxy
Erlang/OTP 19 [erts-8.0] [source] [async-threads:10] [kernel-poll:false]
=INFO REPORT==== 17-Nov-2016::12:42:59 ===
disk_log: repairing "/root/mnesia_database/<wbr>DECISION_TAB.LOG" ...
Mnesia('<a class="m_1377135140050706092moz-txt-link-abbreviated" href="mailto:scu_plus@10.1.13.17" target="_blank">scu_plus@10.1.13.17</a>'): Data may be missing, Corrupt logfile deleted: "/root/mnesia_database/LATEST.<wbr>LOG", {not_a_log_file,
"/root/mnesia_database/LATEST.<wbr>LOG"}
=ERROR REPORT==== 17-Nov-2016::12:43:00 ===
Mnesia('<a class="m_1377135140050706092moz-txt-link-abbreviated" href="mailto:scu_plus@10.1.13.17" target="_blank">scu_plus@10.1.13.17</a>'): ** ERROR ** (core dumped to file: <a class="m_1377135140050706092moz-txt-link-rfc2396E" href="mailto:/root/rel-3/galaxy/MnesiaCore.scu_plus@10.1.13.17_1479_386580_153021" target="_blank">"/root/rel-3/galaxy/<wbr>MnesiaCore.scu_plus@10.1.13.<wbr>17_1479_386580_153021"</a>)
** FATAL ** Failed to merge schema: Bad cookie in table definition configuration_table: '<a class="m_1377135140050706092moz-txt-link-abbreviated" href="mailto:scu_plus@10.1.13.17" target="_blank">scu_plus@10.1.13.17</a>' = {cstruct,configuration_table,<wbr>set,[],['<a class="m_1377135140050706092moz-txt-link-abbreviated" href="mailto:scu_plus@10.1.3.17" target="_blank">scu_plus@10.1.3.17</a>'],<wbr>[],[],0,read_write,false,[],[]<wbr>,false,gen_record,[key,value,<wbr>time_stamp],[],[],[],{{<wbr>1479494951549325042,-<wbr>134217623,1},'<a class="m_1377135140050706092moz-txt-link-abbreviated" href="mailto:scu_plus@10.1.3.17" target="_blank">scu_plus@10.1.3.<wbr>17</a>'},{{2,0},[]}}, '<a class="m_1377135140050706092moz-txt-link-abbreviated" href="mailto:scu_plus@10.1.3.17" target="_blank">scu_plus@10.1.3.17</a>' = {cstruct,configuration_table,<wbr>set,[],['<a class="m_1377135140050706092moz-txt-link-abbreviated" href="mailto:scu_plus@10.1.3.17" target="_blank">scu_plus@10.1.3.17</a>'],<wbr>[],[],0,read_write,false,[],[]<wbr>,false,gen_record,[key,value,<wbr>time_stamp],[],[],[],{{<wbr>1479575314787900797,-<wbr>134217651,1},'<a class="m_1377135140050706092moz-txt-link-abbreviated" href="mailto:scu_plus@10.1.3.17" target="_blank">scu_plus@10.1.3.<wbr>17</a>'},{{2,0},[
]}}
=ERROR REPORT==== 17-Nov-2016::12:43:10 ===
** Generic server mnesia_monitor terminating
** Last message in was {'EXIT',<0.411.0>,killed}
** When Server state == {state,<0.411.0>,[],[],true,[]<wbr>,undefined,[],[]}
** Reason for termination ==
** killed
=ERROR REPORT==== 17-Nov-2016::12:43:10 ===
** Generic server mnesia_recover terminating
** Last message in was {'EXIT',<0.411.0>,killed}
** When Server state == {state,<0.411.0>,undefined,<wbr>undefined,undefined,0,
false,true,[]}
** Reason for termination ==
** killed
=ERROR REPORT==== 17-Nov-2016::12:43:10 ===
** Generic server mnesia_snmp_sup terminating
** Last message in was {'EXIT',<0.411.0>,killed}
** When Server state == {state,
{local,mnesia_snmp_sup},
simple_one_for_one,
[{child,undefined,mnesia_snmp_<wbr>sup,
{mnesia_snmp_hook,start,[]},
transient,3000,worker,
[mnesia_snmp_sup,mnesia_snmp_<wbr>hook,
supervisor]}],
undefined,0,86400000,[],0,<wbr>mnesia_snmp_sup,[]}
** Reason for termination ==
** killed
=ERROR REPORT==== 17-Nov-2016::12:43:10 ===
** Generic server mnesia_subscr terminating
** Last message in was {'EXIT',<0.411.0>,killed}
** When Server state == {state,<0.411.0>,12307}
** Reason for termination ==
** {{aborted,{node_not_running,'<a class="m_1377135140050706092moz-txt-link-abbreviated" href="mailto:scu_plus@10.1.13.17" target="_blank">s<wbr>cu_plus@10.1.13.17</a>'}},
[{mnesia,abort,1,[{file,"<wbr>mnesia.erl"},{line,318}]},
{mnesia_lib,del,2,[{file,"<wbr>mnesia_lib.erl"},{line,485}]},
{mnesia_subscr,do_handle_exit,<wbr>1,[{file,"mnesia_subscr.erl"},<wbr>{line,508}]},
{mnesia_subscr,handle_exit,2,[<wbr>{file,"mnesia_subscr.erl"},{<wbr>line,502}]},
{mnesia_subscr,do_prepare_<wbr>stop,2,[{file,"mnesia_subscr.<wbr>erl"},{line,526}]},
{mnesia_subscr,terminate,2,[{<wbr>file,"mnesia_subscr.erl"},{<wbr>line,304}]},
{gen_server,try_terminate,3,[{<wbr>file,"gen_server.erl"},{line,<wbr>629}]},
{gen_server,terminate,7,[{<wbr>file,"gen_server.erl"},{line,<wbr>795}]}]}
=ERROR REPORT==== 17-Nov-2016::12:43:10 ===
Mnesia('<a class="m_1377135140050706092moz-txt-link-abbreviated" href="mailto:scu_plus@10.1.13.17" target="_blank">scu_plus@10.1.13.17</a>'): ** ERROR ** mnesia_event got unexpected event: {'EXIT',
<0.413.0>,
{aborted,
{node_not_running,
'<a class="m_1377135140050706092moz-txt-link-abbreviated" href="mailto:scu_plus@10.1.13.17" target="_blank">scu_plus@10.1.13.17</a>'}}}
=INFO REPORT==== 17-Nov-2016::12:43:10 ===
application: mnesia
exited: {{shutdown,{failed_to_start_<wbr>child,mnesia_kernel_sup,<wbr>killed}},
{mnesia_sup,start,[normal,[]]}<wbr>}
type: permanent
{"Kernel pid terminated",application_<wbr>controller,"{application_<wbr>start_failure,mnesia,{{<wbr>shutdown,{failed_to_start_<wbr>child,mnesia_kernel_sup,<wbr>killed}},{mnesia_sup,start,[<wbr>normal,[]]}}}"}
Crash dump is being written to: erl_crash.dump...
</pre>
</div>
<br>
Thanks in advance,<br>
Arun <br>
</div>
<br>______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>