<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-2">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello,<br>
<br>
I change default value for param <strong><span class="code">restrict_connections
</span></strong>from 'nodes' to 'false'.<br>
After that I run very simple test using seagull symulator. Test
scenario was following:<br>
<br>
1. seagull: send CER<br>
2. seagull: recv CEA<br>
3. seagull: send CCR (init)<br>
4. seagull: recv CCA (init)<br>
5. seagull: send CCR (update)<br>
6. seagull: recv CCR (update)<br>
7. seagull: send CCR (terminate)<br>
8. seagull: recv CCA (terminate)<br>
<br>
After step 8. seagull does't send DPR, but just closes transport
connection (TCP)<br>
<br>
On server side every think looks good, but 30 sec. after CCR
(terminate) when tw elapsed, following error message appears in log:<br>
<br>
<br>
13:40:58.187129: <0.5046.0>: error: error_logger: --:--/--: **
Generic server <0.5046.0> terminating <br>
** Last message in was {timeout,#Ref<0.0.0.14845>,tw}<br>
** When Server state ==
{watchdog,down,false,30000,0,<0.1009.0>,undefined,<br>
#Ref<0.0.0.14845>,diameter_gen_base_rfc3588,<br>
{recvdata,4259932,diameterNode,<br>
[{diameter_app,diameterNode,dictionaryDCCA,<br>
[dccaCallback],<br>
diameterNode,4,false,<br>
[{answer_errors,report},<br>
{request_errors,answer_3xxx}]}],<br>
{0,32}},<br>
{0,32},<br>
{false,false},<br>
false}<br>
** Reason for termination == <br>
** {function_clause,<br>
[{diameter_watchdog,set_watchdog,<br>
[stop],<br>
[{file,"base/diameter_watchdog.erl"},{line,451}]},<br>
{diameter_watchdog,handle_info,2,<br>
[{file,"base/diameter_watchdog.erl"},{line,211}]},<br>
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,597}]},<br>
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}<br>
<br>
13:40:58.187500: <0.5046.0>: error: error_logger: --:--/--:
[crash_report][[[{initial_call,{diameter_watchdog,init,['Argument__1']}},<br>
{pid,<0.5046.0>},<br>
{registered_name,[]},<br>
{error_info,{exit,{function_clause,[{diameter_watchdog,set_watchdog,[stop],[{file,"base/diameter_watchdog.erl"},{line,451}]},<br>
{diameter_watchdog,handle_info,2,[{file,"base/diameter_watchdog.erl"},{line,211}]},<br>
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,597}]},<br>
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]},<br>
[{gen_server,terminate,6,[{file,"gen_server.erl"},{line,737}]},<br>
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}},<br>
{ancestors,[diameter_watchdog_sup,diameter_sup,<0.946.0>]},<br>
{messages,[]},<br>
{links,[<0.954.0>]},<br>
{dictionary,[{random_seed,{15047,18051,14647}},<br>
{{diameter_watchdog,restart},<br>
{{accept,#Ref<0.0.0.1696>},<br>
[{transport_module,diameter_tcp},<br>
{transport_config,[{reuseaddr,true},{ip,{0,0,0,0}},{port,4068}]},<br>
{capabilities_cb,[#Fun<diameterNode.acceptCER.2>]},<br>
{watchdog_timer,30000},<br>
{reconnect_timer,60000}],<br>
{diameter_service,<0.1009.0>,<br>
{diameter_caps,"zyndram.krakow.comarch","krakow.comarch",[],25429,"Comarch
DIAMETER Server",[],<br>
[12645,10415,8164],<br>
[4],<br>
[],[],[],[],[]},<br>
[{diameter_app,diameterNode,dictionaryDCCA,<br>
[dccaCallback],<br>
diameterNode,4,false,<br>
[{answer_errors,report},{request_errors,answer_3xxx}]}]}}},<br>
{{diameter_watchdog,dwr},<br>
['DWR',{'Origin-Host',"zyndram.krakow.comarch"},{'Origin-Realm',"krakow.comarch"},{'Origin-State-Id',[]}]}]},<br>
{trap_exit,false},<br>
{status,running},<br>
{heap_size,75025},<br>
{stack_size,24},<br>
{reductions,294}],<br>
[]]]<br>
13:40:58.189060: <0.954.0>: error: error_logger: --:--/--:
[supervisor_report][[{supervisor,{local,diameter_watchdog_sup}},<br>
{errorContext,child_terminated},<br>
{reason,{function_clause,[{diameter_watchdog,set_watchdog,[stop],[{file,"base/diameter_watchdog.erl"},{line,451}]},<br>
{diameter_watchdog,handle_info,2,[{file,"base/diameter_watchdog.erl"},{line,211}]},<br>
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,597}]},<br>
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}},<br>
{offender,[{pid,<0.5046.0>},<br>
{name,diameter_watchdog},<br>
{mfargs,{diameter_watchdog,start_link,undefined}},<br>
{restart_type,temporary},<br>
{shutdown,1000},<br>
{child_type,worker}]}]]<br>
<br>
You can check, that function set_watchdog should be called with
param #watchdog{}, but 'stop' param is used instead.<br>
As a result function_clause exception is thrown.<br>
<br>
I suggest following change in code to correct this problem (file
diameter_watchdog.erl):<br>
<br>
$ diff diameter_watchdog.erl_org diameter_watchdog.erl<br>
385a386,393<br>
> transition({timeout, TRef, tw}, #watchdog{tref = TRef, status =
T} = S)<br>
> when T == initial;<br>
> T == down -><br>
> case restart(S) of<br>
> stop -> stop;<br>
> #watchdog{} = NewS -> set_watchdog(NewS)<br>
> end;<br>
><br>
<br>
You can find this solution in attachement.<br>
<br>
Best regards<br>
Aleksander Nycz<br>
<br>
<pre class="moz-signature" cols="72">--
Aleksander Nycz
Senior Software Engineer
Telco_021 BSS R&D
Comarch SA
Phone: +48 12 646 1216
Mobile: +48 691 464 275
website: <a class="moz-txt-link-abbreviated" href="http://www.comarch.pl">www.comarch.pl</a></pre>
</body>
</html>