All,
I’ve been trying to chase down an issue with db_cluster and permissions in combination with something else, where with my full configuration using the same cluster in multiple modules has failures. I’ve been trying to create a simplified
configuration to consistently reproduce the problem without much success, however I did stumble upon THIS particular problem. The configuration here works fine as is – avpops uses the cluster URL, and carrierroute uses the direct SQLite URL. If I define
WITH_DBCLUSTER, then carrierroute fails fetching rows using the cluster connection. Note that AVPOPS is only used as a general test to see if the cluster config works. If I remove references to avpops , carrierroute still fails loading from the cluster URL.
Thoughts?
#!KAMAILIO
loadmodule "db_sqlite"
loadmodule "pv"
loadmodule "db_cluster"
loadmodule "carrierroute"
loadmodule "avpops"
modparam("db_cluster", "connection", "db1=>sqlite:////etc/db.sqlite")
modparam("db_cluster", "cluster", "cl1=>db1=9s9s")
modparam("db_cluster", "inactive_interval", 30)
#!ifdef WITH_DBCLUSTER
modparam("carrierroute", "db_url", "cluster://cl1")
#!else
modparam("carrierroute", "db_url", "sqlite:////etc/db.sqlite")
#!endif
modparam("carrierroute", "config_source", "db")
modparam("avpops", "db_url", "cluster://cl1")
modparam("avpops", "avp_table", "usr_preferences")
request_route {
exit;
}
Failure log:
0(1) ERROR: carrierroute [cr_db.c:345]: load_route_data_db(): Fetching rows failed
0(1) ERROR: carrierroute [cr_data.c:179]: reload_route_data(): could not load routing data
0(1) ERROR: carrierroute [carrierroute.c:240]: mod_init(): could not prepare route data
0(1) ERROR: <core> [core/sr_module.c:942]: init_mod(): Error while initializing module carrierroute (/usr/lib/kamailio/modules/carrierroute.so)
Kaufman