Can you try with ndb_mongodb module?
Is anything suspect in the logs of mongodb server?
What is the version of mongodb-c-driver?
Cheers,
Daniel
On 16/11/15 11:12, Kelvin Chua wrote:
I also figured the code checks out, so i'm not sure where to look, there is no error, just that queries return nothingIf I point the mongo URI just to the primary node, I get this
Nov 16 17:59:45 SG1-SIP /usr/local/sbin/kamailio[16451]: DEBUG: db_mongodb [mongodb_connection.c:55]: db_mongodb_new_connection(): connection open to: mongodb://10.0.1.2/siptraceNov 16 17:59:45 SG1-SIP /usr/local/sbin/kamailio[16451]: DEBUG: db_mongodb [mongodb_dbase.c:851]: db_mongodb_query(): query to collection [version]Nov 16 17:59:45 SG1-SIP /usr/local/sbin/kamailio[16451]: DEBUG: db_mongodb [mongodb_dbase.c:885]: db_mongodb_query(): query filter: { "table_name" : "sip_trace" }Nov 16 17:59:45 SG1-SIP /usr/local/sbin/kamailio[16451]: DEBUG: db_mongodb [mongodb_dbase.c:904]: db_mongodb_query(): columns filter: { "table_version" : 1 }Nov 16 17:59:45 SG1-SIP /usr/local/sbin/kamailio[16451]: DEBUG: db_mongodb [mongodb_dbase.c:349]: db_mongodb_get_columns(): 1 columns returned from the queryNov 16 17:59:45 SG1-SIP /usr/local/sbin/kamailio[16451]: DEBUG: db_mongodb [mongodb_dbase.c:377]: db_mongodb_get_columns(): Found a field[0] named: table_versionNov 16 17:59:45 SG1-SIP /usr/local/sbin/kamailio[16451]: DEBUG: db_mongodb [mongodb_dbase.c:396]: db_mongodb_get_columns(): allocate 16 bytes for RES_NAMES[0] at 0x7f521bfb3ca8Nov 16 17:59:45 SG1-SIP /usr/local/sbin/kamailio[16451]: DEBUG: db_mongodb [mongodb_dbase.c:406]: db_mongodb_get_columns(): use DB1_INT result typeNov 16 17:59:45 SG1-SIP /usr/local/sbin/kamailio[16451]: DEBUG: db_mongodb [mongodb_dbase.c:460]: db_mongodb_get_columns(): RES_NAMES(0x7f521bfb3ca8)[0]=[table_version] (16)Nov 16 17:59:45 SG1-SIP /usr/local/sbin/kamailio[16451]: DEBUG: db_mongodb [mongodb_dbase.c:671]: db_mongodb_convert_result(): selected document: { "_id" : { "$oid" : "5642dec7775a1afd9ecc394e" }, "table_version" : 4 }
if i include a replicaset, this happens:
Nov 16 17:56:47 SG1-SIP /usr/local/sbin/kamailio[16131]: DEBUG: db_mongodb [mongodb_connection.c:55]: db_mongodb_new_connection(): connection open to: mongodb://10.0.1.1,10.0.1.2,10.0.1.3/siptrace?replicaSet=rs0&slaveOk=true&readPreference=primaryPreferredNov 16 17:56:47 SG1-SIP /usr/local/sbin/kamailio[16131]: DEBUG: db_mongodb [mongodb_dbase.c:851]: db_mongodb_query(): query to collection [version]Nov 16 17:56:47 SG1-SIP /usr/local/sbin/kamailio[16131]: DEBUG: db_mongodb [mongodb_dbase.c:885]: db_mongodb_query(): query filter: { "table_name" : "sip_trace" }Nov 16 17:56:47 SG1-SIP /usr/local/sbin/kamailio[16131]: DEBUG: db_mongodb [mongodb_dbase.c:904]: db_mongodb_query(): columns filter: { "table_version" : 1 }Nov 16 17:56:47 SG1-SIP /usr/local/sbin/kamailio[16125]: DEBUG: db_mongodb [mongodb_dbase.c:733]: db_mongodb_store_result(): no result from mongodbNov 16 17:56:47 SG1-SIP /usr/local/sbin/kamailio[16126]: DEBUG: db_mongodb [mongodb_dbase.c:733]: db_mongodb_store_result(): no result from mongodbNov 16 17:56:47 SG1-SIP /usr/local/sbin/kamailio[16154]: DEBUG: <core> [sr_module.c:897]: init_mod_child(): rank -2: ndb_mongodbNov 16 17:56:47 SG1-SIP /usr/local/sbin/kamailio[16128]: DEBUG: db_mongodb [mongodb_dbase.c:733]: db_mongodb_store_result(): no result from mongodbNov 16 17:56:47 SG1-SIP /usr/local/sbin/kamailio[16130]: DEBUG: db_mongodb [mongodb_dbase.c:733]: db_mongodb_store_result(): no result from mongodbNov 16 17:56:47 SG1-SIP /usr/local/sbin/kamailio[16131]: DEBUG: db_mongodb [mongodb_dbase.c:733]: db_mongodb_store_result(): no result from mongodb
Kelvin Chua
On Mon, Nov 16, 2015 at 5:39 PM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Quickly looking at the code, the ndb_mongodb should work with this kind of uri. Do you get any errors?
Can you run with debug=3 and watch for log messages from ndb_mongodb containing '... added server ...'. Does it have the replica set uri there?
Cheers,
Daniel
On 16/11/15 09:57, Kelvin Chua wrote:
yes,
for example:
i tried this but it didn't work.
according to mongoc documentation, this URI should be valid
Kelvin Chua
On Thu, Nov 12, 2015 at 3:53 PM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Is there a specific format of the url for this case?
Cheers,
Daniel
On 11/11/15 11:41, Kelvin Chua wrote:
anybody ever tried using a mongodb url with replicasets and parameters to workwith kamailio?
Kelvin Chua
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com Kamailio Advanced Training, Nov 30-Dec 2, Berlin - http://asipto.com/kat
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com Kamailio Advanced Training, Nov 30-Dec 2, Berlin - http://asipto.com/kat
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com Kamailio Advanced Training, Nov 30-Dec 2, Berlin - http://asipto.com/kat