[sr-dev] trusted_reload fails

Andrei Pelinescu-Onciul andrei at iptel.org
Tue Jul 14 11:00:33 CEST 2009


On Jul 14, 2009 at 11:26, Juha Heinanen <jh at tutpro.com> wrote:
> mi trusted_reload fails like this:
> 
> srctl> mi trusted_reload
> error: 400 - Trusted table reload failed
> 
> and syslog shows these error messages:
> 
> Jul 14 11:21:56 localhost /usr/sbin/sip-router[11658]: ERROR: <core> [db.c:422]: invalid parameter value
> Jul 14 11:21:56 localhost /usr/sbin/sip-router[11658]: ERROR: permissions [trusted.c:76]: failed to use trusted table
> 

It's probably because the DB connection is not init for the RPC
processes.

permissions(k) init_child_trusted():
...
    /* Check if database is needed by child */
        if (db_mode==DISABLE_CACHE && rank>0) {
                                      ^^^^^^^^

persmissions(s) child_init():
...
        /* Connect to the DB regarless of cache or non-cache mode,
        because we either have to query the DB runtime, or reload
        the cache via RPC call */
        if (perm_init_db()) goto error;


An rpc process can have a special rank (e.g.: ctl forks an rpc handling
 process with rank PROC_RPC) or it can be a normal tcp ser process (xmlrpc
 with reuses ser processes).

So you should init the db connections for PROC_RPC, PROC_UNIXSOCK + all the
 processes with rank>0  if you want access to it via ctl and xmlrpc.

Andrei



More information about the sr-dev mailing list