[SR-Users] prefix_route and db_cluster not working

Martin Nyström martin.nystrom at connectel.se
Mon Oct 10 10:05:10 CEST 2016


Hi,

I have an issue when I am unable to get prefix_route to work together with db_cluster. If I set the db_url manually it works great, pointing it to a specific database. However we need the redundancy for this module.

Dispatcher uses the same cluster without any issues.

The following are my configuration sets:

# DB CLUSTER (db_cluster.inc)
loadmodule "db_cluster.so"

modparam("db_cluster", "connection", "KAMDB01=>mysql://kamailio:password123@192.168.55.10/kamailio")
modparam("db_cluster", "connection", "KAMDB02=>mysql://kamailio:password123@192.168.55.11/kamailio")

modparam("db_cluster", "cluster", "AccCluster=>KAMDB02=9s9s;KAMDB01=4s4s")
modparam("db_cluster", "cluster", "Settings=>KAMDB02=9s9s;KAMDB01=4s4s")

# KAMAILIO.CFG (kamailio.cfg)
# PREFIX ROUTE MODPARAM

loadmodule "prefix_route.so"
include_file "db_cluster.inc"
modparam("prefix_route", "db_url", "cluster://Settings")
modparam("prefix_route", "db_table", "prefix_route")
modparam("prefix_route", "exit", 1)


Syslog output:


Oct 10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: ERROR: <core> [db_cmd.c:122]: db_cmd(): DB driver cluster does not implement mandatory db_cmd function

Oct 10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: ERROR: <core> [db_cmd.c:168]: db_cmd(): db_cmd: Cannot create db_cmd structure

Oct 10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: ERROR: prefix_route [prefix_route.c:126]: pr_db_load(): prefix_route: db_load(): db_cmd() failed

Oct 10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: : prefix_route [prefix_route.c:214]: mod_init(): prefix_route: db_load() failed

Oct 10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: ERROR: <core> [sr_module.c:974]: init_mod(): Error while initializing module prefix_route (usr/local/lib64/kamailio/modules/prefix_route.so)

Oct 10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: INFO: <core> [sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized


Ubuntu 14.04LTS
version: kamailio 4.3.6 (x86_64/linux) 105a17
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 105a17
compiled on 10:06:12 Oct  4 2016 with gcc 4.8.4


Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161010/8d24f6df/attachment.html>


More information about the sr-users mailing list