Hi<br><br>I get the following unexpected behavior:<br><br>Two kamailio servers configured to handle REGISTER and OPTIONS receive a traffic load-balanced by a third kamailio/dispatcher node. This works and both servers are receiving equal loads of REGISTER and periodic OPTIONS.<br>
<br>I shutdown first kamailio gateway and I see that almost imediately all the traffic goes to this server instead of being rerouted to the running server ?! After some seconds (eg. 10 seconds) the running gateway does not receive anymore traffic and all the traffic is sent to the server that is shutdown. After more than 20 seconds, the running gateway starts receiving all the traffic.<br>
<br>Nevertheless, when I start again the gateway I've shutdowned, traffic is almost immediately load-balanced again.<br><br>I'm testing the following configuration:<br><br>modparam("dispatcher", "list_file", "/usr/local/etc/kamailio/dispatcher.list")<br>
modparam("dispatcher", "flags", 3)<br>modparam("dispatcher", "dst_avp", "$avp(i:271)")<br>modparam("dispatcher", "grp_avp", "$avp(i:272)")<br>
modparam("dispatcher", "cnt_avp", "$avp(i:273)")<br>modparam("dispatcher", "ds_ping_method", "OPTIONS")<br>modparam("dispatcher", "ds_ping_interval", 3)<br>
modparam("dispatcher", "ds_ping_from", "<a href="mailto:sip%3Afend1@10.132.184.33">sip:fend1@10.132.184.33</a>")<br>modparam("dispatcher", "ds_probing_threshhold", 1)<br>modparam("dispatcher", "ds_probing_mode", 1)<br>
<br>route{<br> if (is_method("REGISTER") || is_method("OPTIONS")) {<br> ds_select_dst("1", "0");<br> t_on_failure("1");<br> t_relay();<br>
exit;<br> }<br>}<br><br>failure_route[1] {<br><br> xlog("L_INFO", "Marking GW as failed...\n");<br> ds_mark_dst("p");<br> ds_next_dst();<br> t_on_failure("1");<br>
t_relay();<br><br>}<br><br><br>Any idea of what is wrong ?<br><br>Regards,<br>Pascal<br><br><br><br><br><br><br><br><div class="gmail_quote">On Mon, Oct 27, 2008 at 11:04 AM, Pascal Maugeri <span dir="ltr"><<a href="mailto:pascal.maugeri@gmail.com">pascal.maugeri@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi<br><br>Thanks this is what I was testing right now :-)<br>I'm also testing the "ds_probing_mode" = 1 that recommended me Klaus.<br>
<br>I understand that the scenario you describe is that OPTIONS are sent when the gw is set in "probe" mode ? I have exactly the opposite behaviour here:<br>
<br>modparam("dispatcher", "list_file", "/usr/local/etc/kamailio/dispatcher.list")<br>modparam("dispatcher", "flags", 3)<br>modparam("dispatcher", "dst_avp", "$avp(i:271)")<br>
modparam("dispatcher", "grp_avp", "$avp(i:272)")<br>modparam("dispatcher", "cnt_avp", "$avp(i:273)")<div class="Ih2E3d"><br>modparam("dispatcher", "ds_ping_method", "OPTIONS")<br>
modparam("dispatcher", "ds_ping_interval", 3)<br></div>modparam("dispatcher", "ds_ping_from", "<a href="mailto:sip%3Afend1@10.132.184.33" target="_blank">sip:fend1@10.132.184.33</a>")<div class="Ih2E3d">
<br>modparam("dispatcher", "ds_probing_threshhold", 3)<br></div>
modparam("dispatcher", "ds_probing_mode", 1)<br><br>I have a simple scenario of load-balancing REGISTER and it looks to work somehow also when I shutdown one gateway my load-balancer takes to much time to detect it.<br>
Does the failure-route also apply to timeout error (REGISTER messages are not handled by the gw that is shutdown) ?<br><br>Regards,<br><font color="#888888">Pascal</font><div><div></div><div class="Wj3C7c"><br> <br><br><div class="gmail_quote">
On Mon, Oct 27, 2008 at 10:45 AM, Carsten Bock <span dir="ltr"><<a href="mailto:lists@bock.info" target="_blank">lists@bock.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
you have to add a failure-route, where you set the state to probing<br>
(e.g. ds_set_state("p")). If this is set 3 times<br>
(ds_probing_threshhold), the gateway will be longer selected from<br>
ds_select_domain / .._dst and will be queried with an OPTIONS-request.<br>
In case of a successful query, the gateway will be enabled again.<br>
As long as the state is active, you will not see any OPTIONS-request.<br>
<br>
Carsten<br>
<br>
Am Freitag, den 24.10.2008, 18:08 +0200 schrieb Klaus Darilion:<br>
<div><div></div><div>> Maybe try<br>
> <a href="http://www.kamailio.org/docs/modules/devel/dispatcher.html#id2467955" target="_blank">http://www.kamailio.org/docs/modules/devel/dispatcher.html#id2467955</a><br>
><br>
> klaus<br>
><br>
> Pascal Maugeri schrieb:<br>
> > Hi<br>
> ><br>
> > How do you configure dispatcher to send OPTIONS ping to load-balanced<br>
> > proxies ?<br>
> ><br>
> > I'm using kamailio 1.4.2 with this of configuration:<br>
> ><br>
> > [...]<br>
> > modparam("dispatcher", "ds_ping_method", "OPTIONS")<br>
> > modparam("dispatcher", "ds_ping_interval", 5)<br>
> > modparam("dispatcher", "ds_ping_from", "<a href="mailto:sip%3Afend1@10.132.184.33" target="_blank">sip:fend1@10.132.184.33</a><br>
> > <mailto:<a href="mailto:sip%253Afend1@10.132.184.33" target="_blank">sip%3Afend1@10.132.184.33</a>>")<br>
> > modparam("dispatcher", "ds_probing_threshhold", 3)<br>
> > [...]<br>
> ><br>
> > The load-balancing works properly : I see the traffic being sent to my<br>
> > proxies. But I don't see any SIP OPTIONS packets.<br>
> ><br>
> > I've read in module doc "This method is only available, if compiled with<br>
> > the probing of failed gateways enabled. " but I can't find how to<br>
> > activate this on compilation time, so I'm not sure if I have this<br>
> > feature or not enable.<br>
> ><br>
> > Regards,<br>
> > Pascal<br>
> ><br>
> ><br>
> ><br>
> > ------------------------------------------------------------------------<br>
> ><br>
> > _______________________________________________<br>
> > Users mailing list<br>
> > <a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
> > <a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
> <a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>