Just as a matter of passing interest:
This problem appears to have reared its head again with Kamailio 4.2:
http://sip-router.org/tracker/index.php?do=details&task_id=178
In my case, it is only under CentOS 7, with Kamailio running using LSB
init scripts adapted through systemd. I have not seen it in any other
scenario, with identical config.
May 03 16:15:14 proxy /usr/local/sbin/kamailio[8508]: ERROR: db_postgres
[km_pg_con.c:86]: db_postgres_new_connection(): connection pointer is NULL
May 03 16:15:14 proxy /usr/local/sbin/kamailio[8508]: ERROR: db_postgres
[km_pg_con.c:99]: db_postgres_new_connection(): cleaning up
0x7fef39cc9068=pkg_free()
May 03 16:15:14 proxy /usr/local/sbin/kamailio[8508]: ERROR: <core>
[db.c:322]: db_do_init2(): could not add connection to the pool
May 03 16:15:14 csrp1 /usr/local/sbin/kamailio[8508]: ERROR: usrloc
[ul_mod.c:429]: child_init(): child(0): failed to connect to database
May 03 16:15:14 proxy /usr/local/sbin/kamailio[8508]: ERROR: <core>
[sr_module.c:923]: init_mod_child(): Error while initializing module
usrloc (/usr/local/lib64/kamaili
May 03 16:15:14 proxy /usr/local/sbin/kamailio[8508]: ERROR: <core>
[main.c:1707]: main_loop(): error in init_child
This problem does not present when running with fork=no, and is indeed
due to my loading 'usrloc' before 'db_postgres'. Swapping the loading
order fixed the problem.
--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web:
http://www.evaristesys.com/,
http://www.csrpswitch.com/