anybody ever tried using a mongodb url with replicasets and parameters to
work
with 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/mailma
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 work
> with kamailio?
>
> Kelvin Chua
>
>
> ___
> SIP Express Router
yes,
for example:
mongodb://10.0.1.1,10.0.1.2,
10.0.1.3/replicaSet=rs0&slaveOk=true&readPreference=primaryPreferred
i tried this but it didn't work.
according to mongoc documentation, this URI should be valid
http://api.mongodb.org/c/1.2.1/mongoc_uri_t.html
Kelvin Chua
On Thu, Nov 12, 201
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 wro
I also figured the code checks out, so i'm not sure where to look, there is
no error, just that queries return nothing
If 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
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 retur
wow i missed this due to a lot of connection logs in
/var/log/mongodb/mongod.log
2015-11-16T09:56:47.675+ I QUERY[conn56345] assertion 16256 Invalid
ns
[siptrace?replicaSet=rs0&slaveOk=true&readPreference=primaryPreferred.version]
ns:siptrace?replicaSet=rs0&slaveOk=true&readPreference=prim
Can you try with the patch from next commit?
https://github.com/kamailio/kamailio/commit/4da5d898da9a0a8f2780dcdf864354098268a7e9
If all runs ok, I will consider it for backporting.
Cheers,
Daniel
On 17/11/15 08:37, Kelvin Chua wrote:
> wow i missed this due to a lot of connection logs in
> /va
awesome! db_mongodb works perfectly
but ndb_mongodb returns error
Nov 17 19:29:11 SG1-SIP kamailio: DEBUG: ndb_mongodb
[mongodb_client.c:155]: mongodbc_add_server(): added server[mgs1]=mongodb://
10.0.1.1
Nov 17 19:29:27 SG1-SIP /usr/local/sbin/kamailio[29970]: ERROR: ndb_mongodb
[mongodb_client.
Have you used quotes around the uri? Like:
modparam("ndb_mongodb", "server",
"name=mgs1;uri='mongodb://10.0.1.1,10.0.1.2,10.0.1.3/replicaSet=rs0&slaveOk=true&readPreference=primaryPreferred'")
Cheers,
Daniel
On 17/11/15 12:32, Kelvin Chua wrote:
> awesome! db_mongodb works perfectly
>
> but ndb_
careless mistake, working fine now.
would be best to backport :)
thanks so much!
Kelvin Chua
On Tue, Nov 17, 2015 at 9:54 PM, Daniel-Constantin Mierla wrote:
> Have you used quotes around the uri? Like:
>
> modparam("ndb_mongodb", "server", "name=mgs1;uri='mongodb://10.0.1.1
> ,10.0.1.2,
> 10.0
So ndb_mongodb is fine, nothing to backport.
For db_mongodb, the issue was in the common db url parser -- I will
backport that one.
Cheers,
Daniel
On 19/11/15 02:57, Kelvin Chua wrote:
> careless mistake, working fine now.
> would be best to backport :)
> thanks so much!
>
> Kelvin Chua
>
> On T
12 matches
Mail list logo