[OpenSIPS-Users] Load_balancer migrating from 2.1 to 2.4

Alain Bieuzent alain.bieuzent at free.fr
Wed Oct 24 03:08:45 EDT 2018


Hi Bogdan,

 

The second parameter is a variable I extracts from a sip Header.

 

# detect resources and store in an AVP

        if (is_present_hf("X-Provider"))

                {

                xlog("L_WARN","Header X-Provider exist for call to : $rU");

                $avp(lb_res) = $hdr(X-Provider);

        } else {

                send_reply("403","Forbidden");

                xlog("L_WARN","Header X-Provider missing for call to : $rU");

                exit;

        }

 

…….

 

  if ( !lb_start("1","$avp(lb_res)") ) {

             send_reply("503","Service full");

                xlog("L_WARM","Route 1 : No resource or full resource for provider $avp(lb_res) for call to : $rU");

             exit;

        }

 

Regards

De : Bogdan-Andrei Iancu <bogdan at opensips.org>
Date : mardi 23 octobre 2018 à 19:22
À : OpenSIPS users mailling list <users at lists.opensips.org>, Alain Bieuzent <alain.bieuzent at free.fr>
Objet : Re: [OpenSIPS-Users] Load_balancer migrating from 2.1 to 2.4

 

Hi Alain,

What are the resources you require via the lb_start() - the second parameter ?

Best regards,

Bogdan-Andrei Iancu
 
OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/
On 10/23/2018 06:28 PM, Alain Bieuzent wrote:

Hi all,

 

I’m trying to migrate from 2.1.5 to 2.4.2, i modify my script to use the new lb_start() function, but now i received a lot of CRITICAL and WARNING message in my logs.

 

Oct 23 14:29:13 ded-lb-out-slave opensips[3592]: CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Oct 23 14:29:13 ded-lb-out-slave opensips[3592]: WARNING:load_balancer:lb_route: initial call of LB - skipping destination 168 <sip:31.169.63.1:5060> - unable to calculate free resources

Oct 23 14:29:13 ded-lb-out-slave opensips[3592]: CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Oct 23 14:29:13 ded-lb-out-slave opensips[3592]: WARNING:load_balancer:lb_route: initial call of LB - skipping destination 169 <sip:31.169.63.2:5060> - unable to calculate free resources

 

in the past I had already tried to migrate from 2.1.5 to 2.3 with the same error message.

 

I do not use the module to limit the number of calls (the resources are set to 10000), I’m using it only to load balance traffic between these 3 trunks. If a call is dropped, I don’t use lb_next to retry to another.

 

id,group_id,dst_uri,resources,probe_mode,description

172,1,sip:X.Y.Z.107:5060,WTF=10000,2,"WTF Trunk 1"

173,1,sip:X.Y.Z.108:5060,WTF=10000,2,"WTF Trunk 2"

174,1,sip:W.Y.Z.109:5060,WTF=10000,2,"WTF Trunk 3"

 

Any idea to why i received this error message (which does not seem to have any impact on the calls)

 

Thanks 

 

Alain

 

 

 

 




_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20181024/4f4f3a5d/attachment.html>


More information about the Users mailing list