[Serusers] multiple SER instances / REGISTRATION problem

Jiri Kuthan jiri at iptel.org
Sat Jan 17 22:38:06 CET 2004


Greg,

I'm digging though serusers archives and found your report. I suppose it 
must have been a private memory leak and I don't remember that we closed
on that. Does the problem persist? 

-jiri

At 05:22 AM 11/25/2003, Greg Fausak wrote:
>Jiri,
>
>Thanks.
>I made these changes (and the loadmodule domain.so) and
>the server fires up fine.  However, when I send a REGISTER
>now I get a message:
>#
>U 2003/11/24 22:16:09.124528 66.228.44.254:5060 -> 66.228.53.216:5060
>SIP/2.0 500 I'm terribly sorry, server error occured (2/TM).
>Via: SIP/2.0/UDP 66.228.53.216:5060.
>From: <sip:123456 at named.com>.
>To: <sip:123456 at named.com>;tag=a6a1c5f60faecf035a1ae5b6e96e979a-8311.
>Call-ID: D54D4F19DB874E9DA7D3354FFF6A0F68 at named.com.
>CSeq: 17301 REGISTER.
>Server: Sip EXpress router (0.8.12 (i386/linux)).
>Content-Length: 0.
>Warning: 392 66.228.44.254:5060 "Noisy feedback tells:  pid=5601 req_src_ip=66.228.44.254 req_src_port=5060 in_uri=sip:named.com out_uri=sip:named.com via_cnt==166".
>
>Also, in the syslog file:
>Nov 24 22:16:27 sipproxy ser[5599]: ERROR: build_req_buf_from_sip_req: out of memory
>Nov 24 22:16:27 sipproxy ser[5599]: ERROR: print_uac_request: no pkg_mem
>Nov 24 22:16:27 sipproxy ser[5599]: ERROR: t_forward_nonack: failure to add branches
>
>
>I remember reading a thread about this error.
>Something about shared memory?
>
>I've got a linux 9.x system, here is the config:
>
>---greg
>
>---
>#
># $Id: ser.cfg,v 1.23 2003/10/13 22:51:55 jiri Exp $
>#
># simple quick-start config script
>#
>
># ----------- global configuration parameters ------------------------
>
>debug=3         # debug level (cmd line: -dddddddddd)
>fork=yes
>log_stderror=no # (cmd line: -E)
>
>/* Uncomment these lines to enter debugging mode
>fork=no
>log_stderror=yes
>*/
>
>check_via=no    # (cmd. line: -v)
>dns=no           # (cmd. line: -r)
>rev_dns=no      # (cmd. line: -R)
>port=5060
>children=4
>fifo="/tmp/ser_fifo"
>
>alias="named.com"
>alias="66.228.44.254"
>
># ------------------ module loading ----------------------------------
>
># Uncomment this if you want to use SQL database
>#loadmodule "/usr/local/lib/ser/modules/mysql.so"
>
>loadmodule "/usr/local/lib/ser/modules/sl.so"
>loadmodule "/usr/local/lib/ser/modules/tm.so"
>loadmodule "/usr/local/lib/ser/modules/acc.so"
>loadmodule "/usr/local/lib/ser/modules/domain.so"
>loadmodule "/usr/local/lib/ser/modules/rr.so"
>loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
>loadmodule "/usr/local/lib/ser/modules/postgres.so"
>loadmodule "/usr/local/lib/ser/modules/usrloc.so"
>loadmodule "/usr/local/lib/ser/modules/group.so"
>loadmodule "/usr/local/lib/ser/modules/uri.so"
>loadmodule "/usr/local/lib/ser/modules/registrar.so"
>loadmodule "/usr/local/lib/ser/modules/exec.so"
>loadmodule "/usr/local/lib/ser/modules/auth.so"
>loadmodule "/usr/local/lib/ser/modules/auth_db.so"
>loadmodule "/usr/local/lib/ser/modules/textops.so"
>loadmodule "/usr/local/lib/ser/modules/xlog.so"
>
># ----------------- setting module-specific parameters ---------------
>
># -- usrloc params --
>modparam("domain", "db_mode", 1)
>modparam("domain", "domain_table", "domain")
>modparam("domain", "domain_col", "did")
>modparam("domain","db_url",
>        "X")
>
>modparam("usrloc|group", "use_domain", 1)
>
>modparam("usrloc","db_mode",1)
>modparam("usrloc|group|auth_db","user_column","user_id")
>modparam("usrloc|uri|group|auth_db","db_url",
>        "X")
>
>modparam("uri","subscriber_user_column","user_id")
>#modparam("uri","db_url",
>#       "X")
>
>#modparam("group","user_column","user_id")
>#modparam("group","db_url",
>#       "X")
>
>modparam("acc", "log_level", 1)
>modparam("acc", "log_flag", 1 )
>modparam("acc", "log_fmt", "miocfsu" )
>#modparam("auth_db","user_column","user_id")
>#modparam("auth_db","db_url",
>#       "X")
>
>
># -- rr params --
># add value to ;lr param to make some broken UAs happy
>#modparam("rr", "enable_full_lr", 1)
>
># -------------------------  request routing logic -------------------
>
># main routing logic
>
>route{
>
>        # initial sanity checks -- messages with
>        # max_forwards==0, or excessively long requests
>#       if (!mf_process_maxfwd_header("10")) {
>#               sl_send_reply("483","Too Many Hops");
>#               break;
>#       };
>        if (msg:len >=  max_len ) {
>                sl_send_reply("513", "Message too big");
>                break;
>        };
>
>        # we record-route all messages -- to make sure that
>        # subsequent messages will go through our proxy; that's
>        # particularly good if upstream and downstream entities
>        # use different transport protocol
>        if (!method=="REGISTER") record_route();
>
>        # subsequent messages withing a dialog should take the
>        # path determined by record-routing
>        if (loose_route()) {
>                # mark routing logic in request
>                append_hf("P-hint: rr-enforced\r\n");
>                xlog("L_WARN", "LOOSE: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n");
>                setflag(1);
>                setflag(2);
>                route(1);
>                break;
>        };
>
>
>#       if (!uri==myself) {
>        if(!is_from_local()) {
>                # mark routing logic in request
>                append_hf("P-hint: outbound\r\n");
>                route(1);
>                break;
>        };
>
>        # if the request is for other domain use UsrLoc
>        # (in case, it does not work, use the following command
>        # with proper names and addresses in it)
>        if (uri==myself) {
>
>                if (method=="REGISTER") {
>
>                        if (!www_authorize("named.com", "subscriber")) {
>                                www_challenge("", "0");
>                                break;
>                        };
>
>                        save("location");
>                        break;
>                };
>
>                lookup("aliases");
>                if (!uri==myself) {
>                        append_hf("P-hint: outbound alias\r\n");
>                        route(1);
>                        break;
>                };
>
>                if (method=="INVITE" || method=="ACK") {
>
>                        if (!www_authorize("named.com", "subscriber")) {
>                                www_challenge("", "0");
>                                break;
>                        };
>                        xlog("L_WARN", "INVITE: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n");
>                        #
>                        if (lookup("location")) {
>                                route(1);
>                                break;
>                        };
>
>                        if(uri=~"sip:[0-9]{10}@.*")
>                        {
>                                xlog("L_WARN", "10DIGIT: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n");
>                                route(2);
>                                break;
>                        }
>                        xlog("L_WARN", "UNKNOWN: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n");
>                        sl_send_reply("580", "Sorry");
>                        break;
>                };
>
>                if (method=="CANCEL") {
>
>                        xlog("L_WARN", "CANCEL: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n");
>                        route(2);
>                        break;
>                };
>
>                sl_send_reply("404", "Not Found");
>                break;
>        };
>        xlog("L_WARN", "FAILATBOTTOM: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n");
>        break;
>}
>
>route[1]
>{
>        # send it out now; use stateful forwarding as it works reliably
>        # even for UDP2TCP
>        if (!t_relay()) {
>                sl_reply_error();
>        };
>}
>
>route[2]
>{
>        consume_credentials();
>        rewritehostport("65.77.154.243:5060");
>        if(!t_relay()) {
>                sl_reply_error();
>                break;
>        };
>}
>[root at sipproxy ser]#
>
>
>
>
>Jiri Kuthan wrote:
>
>>At 12:16 AM 11/24/2003, Greg Fausak wrote:
>>
>>>Jiri,
>>>
>>>I do want to have a multi-domain capability.
>>
>>fragments:
>># -- multi-domain
>>modparam("domain", "db_mode", 1)
>>modparam("usrloc|group", "use_domain", 1)
>>...
>>if (!is_from_local()) { # check against domain-module table
>> .... /* outbound */
>> break;
>>};
>># our domains ...
>>        if (!www_authorize("", "subscriber")) {
>>            # challenge if none or invalid credentials
>>            www_challenge("", "0");
>>            break;
>>        };
>>That's pretty much it, I guess. The list of served domains can be
>>manipulated using serctl.
>>
>>>I'd also like to be able to run multiple processes
>>>on the same database.  These may be different problems.
>>
>>Why? (I mean it sounds like a ticket for problems to me.)
>>-jiri 
>

--
Jiri Kuthan            http://iptel.org/~jiri/ 




More information about the sr-users mailing list