Hi,

It could also be the case, that carrierroute uses Rawquery, which is not supported by all database modules. However, when using db_cluster, the db_cluster module claims to support "any" DB operation, even though the underlying db-module may not support all DB operations.

Thanks,
Carsten 

Henning Westerholt <hw@gilawa.com> schrieb am Mi., 8. Feb. 2023, 19:07:

Hello,

 

if you can not reproduce it with db_mysql, it might be indeed some issue specific related to sqlite. Executing the tests with debug log level should give you more information about the internal database operations, in case you like to look more into it.

 

Cheers,

 

Henning

 

--

Henning Westerholt – https://skalatan.de/blog/

Kamailio services – https://gilawa.com

 

From: Kaufman <bkaufman@bcmone.com>
Sent: Wednesday, February 8, 2023 6:04 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: [SR-Users] Re: DB_CLUSTER failure with carrierroute (and others?)

 

I cannot reproduce this issue against mysql, so perhaps it is just something related to abstraction and concurrent access with sqlite.

 

Kaufman

 

From: Kaufman <bkaufman@bcmone.com>
Sent: Wednesday, February 8, 2023 10:48 AM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: [SR-Users] DB_CLUSTER failure with carrierroute (and others?)

 

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

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe: