I think  that the invite request is looping within the load balancer script.
Almost correct. You don't need to wait for the 483 to make that conclusion, it is enough to watch the INVITE going back and forth between 192.168.100.21 and 192.168.100.17 (and get bigger and bigger, as each new pass through any of the two processes, the LB and proxy, adds another Via header, plus each pass through the proxy adds another P-hint header). So the problem is not a loop within the load balancer but the fact that the proxy returns the INVITE back to the load balancer instead of sending it to the server (the UAS in your case).

The point is that the request-uri (as well as the To-uri) contains an IP address of the LB, which would rarely be the case in real life deployment, and that the proxy following the LB ini the chain is not configured accordingly.

So the LB, when handling the INVITE, properly routes it to the proxy but does not change the request-uri. The proxy then routes the INVITE according to the unchanged request-uri which means that it sends it back to the LB.

In real life deployment, you would have an fqdn in the request-uri, and the LB and the proxy would route the request based on some local policies but would not change the request-uri as there would be no need to do so.

In the load balancer, the local policy is the load balancing configuration itself, where addresses of next hops (in your case, the proxies) are written, and you can see by the capture that it works - the INVITE is forwarded to the IP:port of the proxy.

In the proxy, the local policy may consist in translation of the request-uri fqdn using a standard DNS resolution, or there may be an own configuration table responsible for that. In the former case, both proxies would forward the request to the same IP unless the DNS would provide a different individual response to each of them.

So change the request-uri in the UAC script to some fqdn (like my.sipserver.lan) and find out how to make the proxy translate that name into the IP address and port of the UAS script.

In another words, nothing related to SIPp ;-)

P.


Dne 21.2.2018 v 16:43 Mayur Koshal napsal(a):
Hi Pavel,

Attached is the pcap file with invite request,  and also the uac message log. These logs were taken with probing off. The previous logs were taken with probing mode on(2) and thats why  could not see invite request.

In these logs I can see Too many hops reply and I think that the invite request is looping within the load balancer script.

Regards
Mayur


On Wed, Feb 21, 2018 at 12:09 AM, Šindelka Pavel <sinde...@ttc.cz <mailto:sinde...@ttc.cz>> wrote:

    The .pcap file you've attached shows just a single OPTIONS request
    responded with 484, no INVITE or any other SIP message in it, so
    hard to say whether something in the INVITE was wrong or not. The
    script seems fine to me at first glance. Bear in mind that SIPp
    itself is not very sensitive about the contents of the messages so
    there may be an error in some header which the SIPp UAS does not
    analyze, so the fact that the UAS script is happy with what it
    receives directly from the UAC script does not mean that the UAC
    script has formed the INVITE properly.

    The opensips LB description doesn't seem to require a registration
    of the calling user as a pre-requisite for forwarding of an
    INVITE, so the behaviour cannot be explained by a missing
    Service-Route header in the INVITE.

    So try to capture with better settings so that the INVITE from the
    SIPp script is visible in it. If it looks fine, the rest must be
    the configuration of the opensips LB.

    P.


    Dne 20.2.2018 v 19:10 Mayur Koshal napsal(a):
    Hi Pavel,

    Thanks for your reply and sorry for the delayed response.


    I have tried the setup as below :

    *UAC(192.168.100.21:5065)-------LB (192.168.100.21:5060)------SIP
    Proxy (192.168.100.17:5060)------------UAS(192.168.100.17:5080
    <http://192.168.100.17:5080>)
    *
    sipp commands used :

    .*/sipp -sf uac_mod.xml 192.168.100.21:5060
    <http://192.168.100.21:5060> -s archana -i 192.168.100.21 -p 5065
    -r 1 -rp 1000 -m 10

    ./sipp -sf uas_mod_orig.xml -rsa 192.168.100.21:5060
    <http://192.168.100.21:5060> -i 192.168.100.17 -p 5080*
    *
    *
    where I have registered user archana in the SIP proxy server .

    I am running 1 instance of sipp (UAC) in the machine with LB and
    UAS in the machine with SIP Proxy.

    But I was not successful and got the error message as address
    incomplete.
    It goes to the load balancer script where it load balances but it
    says address incomplete and does not move forward.

    Not able to figure out where the problem is ? Request your help
    as do not know where I am going wrong ?

    The wireshark logs as well as the uas and uac xmls are attached.

    The Opensips LB Logs are as below where destination uri is coming
    as null :

    Feb 20 16:35:13 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2539]: [Script
    Trace][line 247][LB][core xlog] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:13 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2539]: Sending out
    request to lb sip:archana@192.168.100.21:5060
    <http://sip:archana@192.168.100.21:5060>
    Feb 20 16:35:13 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2539]: [Script
    Trace][line 256][LB][core if] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:13 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2539]: [Script
    Trace][line 249][LB][module load_balance] -> (INVITE from
    192.168.100.21, ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:13 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2539]: [Script
    Trace][line 251][LB][core xlog] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:13 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2539]: Inside
    load_balance loop LoadBalance
    Feb 20 16:35:13 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2539]: [Script
    Trace][line 252][LB][module send_reply] -> (INVITE from
    192.168.100.21, ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:13 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2539]: [Script
    Trace][line 253][LB][core exit] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 163][LB][core if] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 157][LB][module mf_process_maxfwd_header] -> (INVITE
    from 192.168.100.21, ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 163][LB][core xlog] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: Inside main route
    loop LoadBalance
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 164][LB][core xlog] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: Sending out
    request to sip:archana@192.168.100.21:5060
    <http://sip:archana@192.168.100.21:5060>
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 165][LB][core xlog] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: Sending out
    request to <null>
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 214][LB][core if] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 167][LB][module has_totag] -> (INVITE from
    192.168.100.21, ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 223][LB][core if] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 218][LB][module is_method] -> (INVITE from
    192.168.100.21, ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 229][LB][core if] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 229][LB][module t_check_trans] -> (INVITE from
    192.168.100.21, ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 241][LB][core if] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 232][LB][module loose_route] -> (INVITE from
    192.168.100.21, ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 241][LB][core xlog] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: Sending out
    request bfrr to <null>
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 242][LB][module record_route] -> (INVITE from
    192.168.100.21, ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 244][LB][core setflag] -> (INVITE from
    192.168.100.21, ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 246][LB][core xlog] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: Sending out
    request to lb <null>
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 247][LB][core xlog] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: Sending out
    request to lb sip:archana@192.168.100.21:5060
    <http://sip:archana@192.168.100.21:5060>
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 256][LB][core if] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 249][LB][module load_balance] -> (INVITE from
    192.168.100.21, ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 251][LB][core xlog] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: Inside
    load_balance loop LoadBalance
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 252][LB][module send_reply] -> (INVITE from
    192.168.100.21, ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)
    Feb 20 16:35:14 stack-LB
    /usr/local/opensips_proxy/sbin/opensips[2541]: [Script
    Trace][line 253][LB][core exit] -> (INVITE from 192.168.100.21,
    ruri=sip:archana@192.168.100.21:5060/
    <http://sip:archana@192.168.100.21:5060/><null>)



    Thanks

    Regards
    Mayur



















    On Tue, Jan 16, 2018 at 10:24 PM, Šindelka Pavel <sinde...@ttc.cz
    <mailto:sinde...@ttc.cz>> wrote:

        Well, as for me, the load balancer stands there to hide from
        the individual clients the topology of the core network and
        to spread evenly the load between them. I know nothing at all
        about OpenSips LB in particular, but a normal SBC does not
        need to know the individual user accounts in advance - when
        it sees the first REGISTER, it chooses the right core machine
        according to its load distribution rules, and remembers that
        assignment if the REGISTER is successful. And if an INVITE
        comes from the same user, it re-uses the association. If we
        talk about "trunk" peers which do not register, then the core
        machine is chosen individually for each new dialog (on UDP)
        or each new TCP session (on TCP).

        So in your example scenario, I would run a single UAC
        scenario talking to the LB, and as many UAS scenarios as you
        have proxies. In case of two core machines and even call
        distribution and UDP, you should end up with 2 N calls at the
        UAC and N calls at each UAS. With TCP, all the UAC calls may
        end at the same UAS if the "single-TCP-session-for-all-calls"
        mode is used at UAC SIPp side, or again 1:1 share on both UAS
        if "new-TCP-session-for-each-call" mode is used.

        P.


        Dne 15.1.2018 v 18:24 Mayur Koshal napsal(a):
        Hi All,


        I am using sipp to run performance of the Opensips proxy server.

        My setup is as :
        *
        UAC(192.168.100.19:5065)------Opensips Proxy
        Server(192.168.100.187:5060)--------UAS(192.168.100.187:5080
        <http://192.168.100.187:5080>)
        *

        I have registered a user Mayur@192.168.100.187:5080
        <http://Mayur@192.168.100.187:5080> in the Opensips using
        ./opensipsctl ul add command.


        UAC  command : ./sipp -sf uac.xml 192.168.100.187:5060
        <http://192.168.100.187:5060> -s Mayur -i 192.168.100.19 -p
        5065 -m 10
        UAS  command : ./sipp -sf uas.xml -rsa 192.168.100.187:5060
        <http://192.168.100.187:5060> -i 192.168.100.187 -p 5080 -m 10

        I have been able to successfully run the setup and test the
        performance of opensips.(Thanks to Pavel for resolving the
        issues which I faced.)



        *Now I have introduced a load balancer in between UAC and
        Opensips proxy server like :*


        *UAC(192.168.100.19:5065 <http://192.168.100.19:5065>) ----
        Opensips LB(192.168.100.19:5060)--------
        ------  Opensips Proxy
        Server(192.168.100.187:5060)--------UAS(192.168.100.187:5080
        <http://192.168.100.187:5080>)*


        The load balancer forwards the incoming request to the proxy
        server as it is configured in the load balancer table.

        *My Ques are :

        1) Should I add the user in the load balancer or Opensips
        Proxy server ?

        2) How will the UAC and UAS commands look like in this case
        of load balancing. I am somehow not able to figure out.



        Request your help and suggestion for the sipp configuration
        to be used for testing the load balancer setup. I have tried
        some but did not succeed.*


        Thanks

        Regards
        Mayur


        
------------------------------------------------------------------------------
        Check out the vibrant tech community on one of the world's most
        engaging tech sites, Slashdot.org!http://sdm.link/slashdot


        _______________________________________________
        Sipp-users mailing list
        Sipp-users@lists.sourceforge.net
        <mailto:Sipp-users@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/sipp-users
        <https://lists.sourceforge.net/lists/listinfo/sipp-users>


        
------------------------------------------------------------------------------
        Check out the vibrant tech community on one of the world's most
        engaging tech sites, Slashdot.org! http://sdm.link/slashdot
        _______________________________________________
        Sipp-users mailing list
        Sipp-users@lists.sourceforge.net
        <mailto:Sipp-users@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/sipp-users
        <https://lists.sourceforge.net/lists/listinfo/sipp-users>





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to