[OpenSIPS-Users] Load Balancer module only sending calls to 4 servers in a group

fabio4prez bobby.smith at gmail.com
Thu Jul 9 23:52:09 CEST 2009


A bit more digging shows in the log (debug mode 6):

Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:db_postgres:free_query: PQclear(0x277bbe0) result set
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_db_load_data: 13 records found in load_balancer
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi: uri=<sip:ip>, grp=1, res=<handset=75>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:parse_resorces_list: discovered 1 resources
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi:  setting for uri=<sip:ip> (1)
resource=<handset>, val=75
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_resource:  new resource name=<handset>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_resource: adding dialog profile <lbXhandset>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:dialog:add_profile_definitions: creating profile <lbXhandset>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_resource: adding <handset> as head
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_set_resource_bitmask: realloc the bitmap for bit 0 -
old size=0; new size=4
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_set_resource_bitmask: setting bit 0 in unit 0 , pos 0
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi: uri=<sip:ip>, grp=1, res=<handset=75>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:parse_resorces_list: discovered 1 resources
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi:  setting for uri=<sip:ip> (2)
resource=<handset>, val=75
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_set_resource_bitmask: setting bit 1 in unit 0 , pos 1
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi: uri=<sip:ip>, grp=1, res=<handset=75>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:parse_resorces_list: discovered 1 resources
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi:  setting for uri=<sip:ip> (3)
resource=<handset>, val=75
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_set_resource_bitmask: setting bit 2 in unit 0 , pos 2
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi: uri=<sip:ip>, grp=1, res=<handset=75>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:parse_resorces_list: discovered 1 resources
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi:  setting for uri=<sip:ip> (4)
resource=<handset>, val=75
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_set_resource_bitmask: setting bit 3 in unit 0 , pos 3
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi: uri=<sip:ip>, grp=1, res=<handset=75>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:parse_resorces_list: discovered 1 resources
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi:  setting for uri=<sip:ip> (5)
resource=<handset>, val=75
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_set_resource_bitmask: setting bit 4 in unit 0 , pos 4
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi: uri=<sip:ip>, grp=1, res=<handset=75>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:parse_resorces_list: discovered 1 resources
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi:  setting for uri=<sip:ip> (6)
resource=<handset>, val=75
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_set_resource_bitmask: setting bit 5 in unit 0 , pos 5
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi: uri=<sip:ip>, grp=1, res=<handset=75>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:parse_resorces_list: discovered 1 resources
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi:  setting for uri=<sip:ip> (7)
resource=<handset>, val=75
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_set_resource_bitmask: setting bit 6 in unit 0 , pos 6
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi: uri=<sip:ip>, grp=1, res=<handset=75>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:parse_resorces_list: discovered 1 resources
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi:  setting for uri=<sip:ip> (8)
resource=<handset>, val=75
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_set_resource_bitmask: setting bit 7 in unit 0 , pos 7
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi: uri=<sip:ip>, grp=1, res=<handset=75>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:parse_resorces_list: discovered 1 resources
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi:  setting for uri=<sip:ip> (9)
resource=<handset>, val=75
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_set_resource_bitmask: setting bit 8 in unit 0 , pos 8
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi: uri=<sip:ip>, grp=1, res=<handset=75>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:parse_resorces_list: discovered 1 resources
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi:  setting for uri=<sip:ip> (10)
resource=<handset>, val=75
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_set_resource_bitmask: setting bit 9 in unit 0 , pos 9
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi: uri=<sip:ip>, grp=1, res=<handset=75>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:parse_resorces_list: discovered 1 resources
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi:  setting for uri=<sip:ip> (11)
resource=<handset>, val=75
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_set_resource_bitmask: setting bit 10 in unit 0 , pos 10
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi: uri=<sip:ip>, grp=1, res=<handset=75>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:parse_resorces_list: discovered 1 resources
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi:  setting for uri=<sip:ip> (12)
resource=<handset>, val=75
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_set_resource_bitmask: setting bit 11 in unit 0 , pos 11
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi: uri=<sip:ip>, grp=1, res=<handset=75>
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:parse_resorces_list: discovered 1 resources
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:add_lb_dsturi:  setting for uri=<sip:ip> (13)
resource=<handset>, val=75
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:load_balancer:lb_set_resource_bitmask: setting bit 12 in unit 0 , pos 12
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:core:db_free_rows: freeing 13 rows
Jul  9 17:34:30 cloud_registrar_lb /sbin/opensips[2114]:
DBG:core:db_free_row: freeing row values at 0x780210


So it looks like it loads them all, but on an actual physical request, it
looks like it only sees four:

Jul  9 17:34:36 cloud_registrar_lb /sbin/opensips[2131]:
DBG:rr:add_rr_param: adding (;did=f7e.e3869e65) 0x786ab8
Jul  9 17:34:36 cloud_registrar_lb /sbin/opensips[2131]:
DBG:load_balancer:do_load_balance: destination <sip:ip> selected for LB set
with free=75 (max=75)
Jul  9 17:34:36 cloud_registrar_lb /sbin/opensips[2131]:
DBG:load_balancer:do_load_balance: destination <sip:ip> selected for LB set
with free=75 (max=75)
Jul  9 17:34:36 cloud_registrar_lb /sbin/opensips[2131]:
DBG:load_balancer:do_load_balance: destination <sip:ip> selected for LB set
with free=75 (max=75)
Jul  9 17:34:36 cloud_registrar_lb /sbin/opensips[2131]:
DBG:load_balancer:do_load_balance: destination <sip:ip> selected for LB set
with free=75 (max=75)
Jul  9 17:34:36 cloud_registrar_lb /sbin/opensips[2131]: [REQUEST
6d8104b2-57c2828b at 10.0.4.17]::LoadBalancing --- new destination is sip:ip
Jul  9 17:34:36 cloud_registrar_lb /sbin/opensips[2131]: [REQUEST
6d8104b2-57c2828b at 10.0.4.17]::Entering NAT fix-up for initial message INVITE
Jul  9 17:34:36 cloud_registrar_lb /sbin/opensips[2131]:
DBG:core:parse_headers: flags=ffffffffffffffff
Jul  9 17:34:36 cloud_registrar_lb /sbin/opensips[2131]: [REQUEST
6d8104b2-57c2828b at 10.0.4.17]::Request message is: INVITE   v=0  o=- 1760534
1760534 IN IP4 10.0.4.17  s=-  c=IN IP4 67.211.23.182  t=0 0  m=audio 2298
RTP/AVP 18 0 8 101  a=rtpmap:18 G729a/8000  a=rtpmap:0 PCMU/8000  a=rtpmap:8
PCMA/8000  a=rtpmap:101 telephone-event/8000  a=fmtp:101 0-15  a=ptime:30 
a=sendrecv    and the request uri is 302 and the destination uri is
sip:174.129.85.47
Jul  9 17:34:36 cloud_registrar_lb /sbin/opensips[2131]:
DBG:core:parse_headers: flags=80
Jul  9 17:34:36 cloud_registrar_lb /sbin/opensips[2131]:
DBG:core:parse_headers: flags=ffffffffffffffff
Jul  9 17:34:36 cloud_registrar_lb /sbin/opensips[2131]:
DBG:nathelper:check_content_type: type <application/sdp> found valid
Jul  9 17:34:36 cloud_registrar_lb /sbin/opensips[2131]: [REQUEST
6d8104b2-57c2828b at 10.0.4.17]::NAT enabled is true, so doing nat fix-up for
INVITE::6d8104b2-57c2




fabio4prez wrote:
> 
> Also, to add a note:
> 
> If i move the 4th row in the database to the 14th row (with 14 as the PK
> id), and delete the fourth row, and reload the load balancer list, the new
> fourth server receives traffic.  IE the first four:
> 
> "1";1;"sip:1.2.3.4";"handset=75";"server1"
> 
>> "2";1;"sip:sip:1.2.3.5";"handset=75";"server2"
>> "3";1;"sip:sip:1.2.3.6";"handset=75";"server3"
>> "5";1;"sip:sip:1.2.3.8";"handset=75";"server5"
> 
> 
> Now receives calls.
> 
> On Thu, Jul 9, 2009 at 3:32 PM, Bobby Smith <bobby.smith at gmail.com> wrote:
> 
>> Hello,
>>
>> I've currently got the load balancer set up with a single group (we'll
>> call
>> it "handset", as our opensips server using the loadbalancing is just
>> acting
>> as a registrar/proxy to a softswitch).
>>
>> This is how it's defined in the database table:
>>
>> "1";1;"sip:1.2.3.4";"handset=75";"server1"
>> "2";1;"sip:sip:1.2.3.5";"handset=75";"server2"
>> "3";1;"sip:sip:1.2.3.6";"handset=75";"server3"
>> "4";1;"sip:sip:1.2.3.7";"handset=75";"server4"
>> "5";1;"sip:sip:1.2.3.8";"handset=75";"server5"
>> "6";1;"sip:sip:1.2.3.9";"handset=75";"server6"
>> "7";1;"sip:sip:1.2.3.10";"handset=75";"server7"
>> "8";1;"sip:1.2.3.11";"handset=75";"server8"
>> "9";1;"sip:1.2.3.12";"handset=75";"server9"
>> "10";1;"sip:1.2.3.13";"handset=75";"server10"
>> "11";1;"sip:1.2.3.14";"handset=75";"server11"
>> "12";1;"sip:1.2.3.15";"handset=75";"server12"
>> "13";1;"sip:1.2.3.16";"handset=75";"server13"
>>
>> When active, it seems the load balancer is only sending to the first 4
>> servers in the list:
>>
>> [root at cloud_registrar_lb mnt]# opensipsctl fifo lb_list
>> Destination:: sip:1.2.3.4 id=1
>>     Resource:: handset max=75 load=75
>> Destination:: sip:1.2.3.5 id=2
>>     Resource:: handset max=75 load=75
>> Destination:: sip:1.2.3.6 id=3
>>     Resource:: handset max=75 load=75
>> Destination:: sip:1.2.3.7 id=4
>>     Resource:: handset max=75 load=75
>> Destination:: sip:1.2.3.8 id=5
>>     Resource:: handset max=75 load=0
>> Destination:: sip:1.2.3.9 id=6
>>     Resource:: handset max=75 load=0
>> Destination:: sip:1.2.3.10 id=7
>>     Resource:: handset max=75 load=0
>> Destination:: sip:1.2.3.11 id=8
>>     Resource:: handset max=75 load=0
>> Destination:: sip:1.2.3.12 id=9
>>     Resource:: handset max=75 load=0
>> Destination:: sip:1.2.3.13 id=10
>>     Resource:: handset max=75 load=0
>> Destination:: sip:1.2.3.14 id=11
>>     Resource:: handset max=75 load=0
>> Destination:: sip:1.2.3.15 id=12
>>     Resource:: handset max=75 load=0
>> Destination:: sip:1.2.3.16 id=13
>>     Resource:: handset max=75 load=0
>>
>> I don't see anything in the log identifying that we're even try to send
>> anything beyond the first 4 servers, and an ngrep confirms that it's
>> essentially balancing messages to just the first four without trying the
>> rest.
>>
>> Any thoughts?  I'm using the 1.5.1 version of the load balancer.
>>
>> Thanks,
>>
>> Bobby S
>>
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Load-Balancer-module-only-sending-calls-to-4-servers-in-a-group-tp3233623p3234332.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list