<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hello Bogdan,<br>
<br>
no, fisrt one is route[] is using (!load_balance("1","tran")) and
second one in failoure route is using <small>(!load_balance("2","test"))
parameteres. So, they are using different resources.<br>
<br>
BR,<br>
Miha<br>
</small><br>
Dne 6/24/2013 4:44 PM, piše Bogdan-Andrei Iancu:<br>
</div>
<blockquote cite="mid:51C85B4D.80901@opensips.org" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hello Miha,<br>
<br>
The CRITICAL error says that the the destinations previously
selected (on first LB) do not have the resources requested by the
second LB function.<br>
<br>
So, my first question is : when doing LB (first and second time in
failure route), are you using the same set of resources ?<br>
<br>
Best regards,<br>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<br>
On 06/24/2013 04:54 PM, Miha wrote:
<blockquote cite="mid:51C84F9D.9030206@softnet.si" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
HI,<br>
<br>
I need a little help regarding load_balance issue. I am doing
load_balance, for 408 responses I am doing again in
failure_route as I would like to implement callforward after
some periad of time.<br>
<br>
Fist time load_balance from route[] works like it should but
when I am doing it in failure_route I am getting this:<br>
<br>
DBG:load_balancer:do_load_balance: found requested (0) resource
test<br>
DBG:load_balancer:do_load_balance: sequential call of LB -
previous selected dst is 1<br>
DBG:load_balancer:do_load_balance: skipping destination <a
moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="sip:xxx.xxx.xxx.xxx:5060"><sip:xxx.xxx.xxx.xxx:5060></a>
(used=1 , disabled=0)<br>
CRITICAL:load_balancer:get_dst_load: bug - cannot find request
resource in dst<br>
DBG:load_balancer:do_load_balance: destination <a
moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="sip:xxx.xxx.xxx.xxx:5060"><sip:xxx.xxx.xxx.xxx:5060></a>
selected for LB set with free=0 (max=0)<br>
ERROR:load_balancer:do_load_balance: failed to remove from
profile<br>
<br>
<br>
<br>
I tried with different resource and id group in failure_route as
in route[] but still the same.<br>
<br>
not working:<br>
<small>failure_route[CFW_NR]<br>
{<br>
if(t_check_status("408")){<br>
xlog("Zgodi se CFW_NR po $avp(cfw_nr_timeout)
sekundah, cfwnr stevilka: $avp(cfw_nr)");<br>
$rU=$avp(cfw_nr);<br>
route(number_translation_to_sbc);<br>
if (!load_balance("2","test")) {<br>
xlog("gre v !load_balance");<br>
send_reply("503","Service
Unavailable");<br>
exit;<br>
}<br>
<br>
#route(from_sbc_slo);<br>
<br>
<br>
}<br>
}</small><br>
<br>
<br>
works:<br>
route[from_sbc_slo]{<br>
xlog("from_sbc_slo load balancing");<br>
if (!load_balance("1","tran")) {<br>
xlog("gre v !load_balance");<br>
send_reply("503","Service Unavailable");<br>
exit;<br>
}<br>
xlog("doing load balancing");<br>
route(group_calls);<br>
t_relay();<br>
exit;<br>
}<br>
<br>
<br>
<table id="table_results" class="data">
<thead><tr>
<th><a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&table=load_balancer&sql_query=SELECT+%2A+FROM+%60load_balancer%60+ORDER+BY+%60load_balancer%60.%60id%60+ASC&token=c0371a75d6d4c9c17d156b486f075de6"
title="Razvrsti">id</a> </th>
<th> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&table=load_balancer&sql_query=SELECT+%2A+FROM+%60load_balancer%60+ORDER+BY+%60load_balancer%60.%60group_id%60+ASC&token=c0371a75d6d4c9c17d156b486f075de6"
title="Razvrsti">group_id</a> </th>
<th> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&table=load_balancer&sql_query=SELECT+%2A+FROM+%60load_balancer%60+ORDER+BY+%60load_balancer%60.%60dst_uri%60+ASC&token=c0371a75d6d4c9c17d156b486f075de6"
title="Razvrsti">dst_uri</a> </th>
<th> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&table=load_balancer&sql_query=SELECT+%2A+FROM+%60load_balancer%60+ORDER+BY+%60load_balancer%60.%60resources%60+ASC&token=c0371a75d6d4c9c17d156b486f075de6"
title="Razvrsti">resources</a> </th>
<th> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&table=load_balancer&sql_query=SELECT+%2A+FROM+%60load_balancer%60+ORDER+BY+%60load_balancer%60.%60probe_mode%60+ASC&token=c0371a75d6d4c9c17d156b486f075de6"
title="Razvrsti">probe_mode</a> </th>
<th> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&table=load_balancer&sql_query=SELECT+%2A+FROM+%60load_balancer%60+ORDER+BY+%60load_balancer%60.%60description%60+ASC&token=c0371a75d6d4c9c17d156b486f075de6"
title="Razvrsti">description</a> </th>
</tr>
</thead> <tbody>
<tr class="odd">
<td align="center"> <input id="id_rows_to_delete0"
name="rows_to_delete[%60load_balancer%60.%60id%60+%3D+1]"
onclick="copyCheckboxesRange('rowsDeleteForm',
'id_rows_to_delete0','l');" value="DELETE FROM
`opensips`.`load_balancer` WHERE `load_balancer`.`id`
= 1" type="checkbox"> </td>
<td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/tbl_change.php?db=opensips&table=load_balancer&where_clause=%60load_balancer%60.%60id%60+%3D+1&clause_is_unique=1&sql_query=SELECT+%2A+FROM+%60load_balancer%60&goto=sql.php&token=c0371a75d6d4c9c17d156b486f075de6"><img
src="cid:part10.08090409.04070601@softnet.si"
title="Uredi" alt="Uredi" class="icon" height="16"
width="16"></a> </td>
<td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&table=load_balancer&sql_query=DELETE+FROM+%60opensips%60.%60load_balancer%60+WHERE+%60load_balancer%60.%60id%60+%3D+1&zero_rows=Vrstica+je+izbrisana&goto=sql.php%3Fdb%3Dopensips%26table%3Dload_balancer%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560load_balancer%2560%26zero_rows%3DVrstica%2Bje%2Bizbrisana%26goto%3Dtbl_structure.php%26token%3Dc0371a75d6d4c9c17d156b486f075de6&token=c0371a75d6d4c9c17d156b486f075de6"
onclick="return confirmLink(this, 'DELETE FROM
`opensips`.`load_balancer` WHERE `load_balancer`.`id`
= 1')"><img
src="cid:part12.09010609.08060805@softnet.si"
title="Izbriši" alt="Izbriši" class="icon"
height="16" width="16"></a> </td>
<td class=" nowrap" align="right">1</td>
<td class=" nowrap" align="right">1</td>
<td class=""><a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="sip:xxx.xxx.xxx.xxx:5060">sip:xxx.xxx.xxx.xxx:5060</a></td>
<td class="">tran=20;test=30</td>
<td class=" nowrap" align="right">2</td>
<td class="">FS</td>
</tr>
<tr class="even">
<td align="center"> <input id="id_rows_to_delete1"
name="rows_to_delete[%60load_balancer%60.%60id%60+%3D+2]"
onclick="copyCheckboxesRange('rowsDeleteForm',
'id_rows_to_delete1','l');" value="DELETE FROM
`opensips`.`load_balancer` WHERE `load_balancer`.`id`
= 2" type="checkbox"> </td>
<td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/tbl_change.php?db=opensips&table=load_balancer&where_clause=%60load_balancer%60.%60id%60+%3D+2&clause_is_unique=1&sql_query=SELECT+%2A+FROM+%60load_balancer%60&goto=sql.php&token=c0371a75d6d4c9c17d156b486f075de6"><img
src="cid:part10.08090409.04070601@softnet.si"
title="Uredi" alt="Uredi" class="icon" height="16"
width="16"></a> </td>
<td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&table=load_balancer&sql_query=DELETE+FROM+%60opensips%60.%60load_balancer%60+WHERE+%60load_balancer%60.%60id%60+%3D+2&zero_rows=Vrstica+je+izbrisana&goto=sql.php%3Fdb%3Dopensips%26table%3Dload_balancer%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560load_balancer%2560%26zero_rows%3DVrstica%2Bje%2Bizbrisana%26goto%3Dtbl_structure.php%26token%3Dc0371a75d6d4c9c17d156b486f075de6&token=c0371a75d6d4c9c17d156b486f075de6"
onclick="return confirmLink(this, 'DELETE FROM
`opensips`.`load_balancer` WHERE `load_balancer`.`id`
= 2')"><img
src="cid:part12.09010609.08060805@softnet.si"
title="Izbriši" alt="Izbriši" class="icon"
height="16" width="16"></a> </td>
<td class=" nowrap" align="right">2</td>
<td class=" nowrap" align="right">1</td>
<td class=""><a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="sip:xxx.xxx.xxx.xxx:5060">sip:xxx.xxx.xxx.xxx:5060</a></td>
<td class="">tran=20</td>
<td class=" nowrap" align="right">2</td>
<td class="">FS2</td>
</tr>
<tr class="odd">
<td align="center"> <input id="id_rows_to_delete2"
name="rows_to_delete[%60load_balancer%60.%60id%60+%3D+3]"
onclick="copyCheckboxesRange('rowsDeleteForm',
'id_rows_to_delete2','l');" value="DELETE FROM
`opensips`.`load_balancer` WHERE `load_balancer`.`id`
= 3" type="checkbox"> </td>
<td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/tbl_change.php?db=opensips&table=load_balancer&where_clause=%60load_balancer%60.%60id%60+%3D+3&clause_is_unique=1&sql_query=SELECT+%2A+FROM+%60load_balancer%60&goto=sql.php&token=c0371a75d6d4c9c17d156b486f075de6"><img
src="cid:part10.08090409.04070601@softnet.si"
title="Uredi" alt="Uredi" class="icon" height="16"
width="16"></a> </td>
<td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&table=load_balancer&sql_query=DELETE+FROM+%60opensips%60.%60load_balancer%60+WHERE+%60load_balancer%60.%60id%60+%3D+3&zero_rows=Vrstica+je+izbrisana&goto=sql.php%3Fdb%3Dopensips%26table%3Dload_balancer%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560load_balancer%2560%26zero_rows%3DVrstica%2Bje%2Bizbrisana%26goto%3Dtbl_structure.php%26token%3Dc0371a75d6d4c9c17d156b486f075de6&token=c0371a75d6d4c9c17d156b486f075de6"
onclick="return confirmLink(this, 'DELETE FROM
`opensips`.`load_balancer` WHERE `load_balancer`.`id`
= 3')"><img
src="cid:part12.09010609.08060805@softnet.si"
title="Izbriši" alt="Izbriši" class="icon"
height="16" width="16"></a> </td>
<td class=" nowrap" align="right">3</td>
<td class=" nowrap" align="right">2</td>
<td class=""><a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="sip:xxx.xxx.xxx.xxx2:5060">sip:xxx.xxx.xxx.xxx2:5060</a></td>
<td class="">test=30</td>
<td class=" nowrap" align="right">2</td>
<td class="">FS2 test</td>
</tr>
<tr class="even">
<td align="center"> <input id="id_rows_to_delete3"
name="rows_to_delete[%60load_balancer%60.%60id%60+%3D+4]"
onclick="copyCheckboxesRange('rowsDeleteForm',
'id_rows_to_delete3','l');" value="DELETE FROM
`opensips`.`load_balancer` WHERE `load_balancer`.`id`
= 4" type="checkbox"> </td>
<td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/tbl_change.php?db=opensips&table=load_balancer&where_clause=%60load_balancer%60.%60id%60+%3D+4&clause_is_unique=1&sql_query=SELECT+%2A+FROM+%60load_balancer%60&goto=sql.php&token=c0371a75d6d4c9c17d156b486f075de6"><img
src="cid:part10.08090409.04070601@softnet.si"
title="Uredi" alt="Uredi" class="icon" height="16"
width="16"></a> </td>
<td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&table=load_balancer&sql_query=DELETE+FROM+%60opensips%60.%60load_balancer%60+WHERE+%60load_balancer%60.%60id%60+%3D+4&zero_rows=Vrstica+je+izbrisana&goto=sql.php%3Fdb%3Dopensips%26table%3Dload_balancer%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560load_balancer%2560%26zero_rows%3DVrstica%2Bje%2Bizbrisana%26goto%3Dtbl_structure.php%26token%3Dc0371a75d6d4c9c17d156b486f075de6&token=c0371a75d6d4c9c17d156b486f075de6"
onclick="return confirmLink(this, 'DELETE FROM
`opensips`.`load_balancer` WHERE `load_balancer`.`id`
= 4')"><img
src="cid:part12.09010609.08060805@softnet.si"
title="Izbriši" alt="Izbriši" class="icon"
height="16" width="16"></a> </td>
<td class=" nowrap" align="right">4</td>
<td class=" nowrap" align="right">2</td>
<td class=""><a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="sip:xxx.xxx.xxx.xxx:5060">sip:xxx.xxx.xxx.xxx:5060</a></td>
<td class="">test=20</td>
<td class=" nowrap" align="right">2</td>
<td class="">test</td>
</tr>
</tbody>
</table>
<br>
<br>
<br>
<br>
<br>
<pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</blockquote>
<br>
</body>
</html>