Re: [SR-Users] kamailio does not start with db_mongdb and usrloc

2018-03-13 Thread Daniel-Constantin Mierla
Just to update on this discussion, if someone is going to read it in the future... Apparently the support for projection was added in the mongo-c-driver library v1.5.0. With older versions it proved that using projection to specify the list of returned columns triggered errors. The master branch

Re: [SR-Users] kamailio does not start with db_mongdb and usrloc

2018-03-01 Thread Stephane
Thanks very much Daniel ! This is working now, with both mongo server versions. Kind regards, Stephane On 1 March 2018 at 14:31, Daniel-Constantin Mierla wrote: > Hello, > > indeed, it was a similar case in another function. Can you fetch again > master and try? > > Cheers, > Daniel > > On 01.03

Re: [SR-Users] kamailio does not start with db_mongdb and usrloc

2018-03-01 Thread Daniel-Constantin Mierla
Hello, indeed, it was a similar case in another function. Can you fetch again master and try? Cheers, Daniel On 01.03.18 13:32, Stephane wrote: > Hello Daniel, > > Maybe a similar issue somewhere else in the code? > > 0(5462) ERROR: db_mongodb [mongodb_dbase.c:557]: > db_mongodb_convert_bson():

Re: [SR-Users] kamailio does not start with db_mongdb and usrloc

2018-03-01 Thread Stephane
Hello Daniel, Maybe a similar issue somewhere else in the code? 0(5462) ERROR: db_mongodb [mongodb_dbase.c:557]: db_mongodb_convert_bson(): field [projection] not found in result iterator 0(5462) ERROR: db_mongodb [mongodb_dbase.c:708]: db_mongodb_convert_result(): failed to convert bson at pos

Re: [SR-Users] kamailio does not start with db_mongdb and usrloc

2018-03-01 Thread Daniel-Constantin Mierla
Hello, thanks for testing -- the new error was on matching returned columns, as now they are stored in the projection field document. I just pushed a new patch, can you try again with latest master? Cheers, Daniel On 01.03.18 11:14, Stephane wrote: > Hello Daniel, > > The format of the mongo r

Re: [SR-Users] kamailio does not start with db_mongdb and usrloc

2018-03-01 Thread Stephane
Hello Daniel, The format of the mongo request is better I think. But there is the following new error (with both mongo server versions) 0(30473) ERROR: db_mongodb [mongodb_dbase.c:386]: db_mongodb_get_columns(): field [projection] not found in result iterator 0(30473) ERROR: db_mongodb [mongodb

Re: [SR-Users] kamailio does not start with db_mongdb and usrloc

2018-02-28 Thread Daniel-Constantin Mierla
Hello, can you try with latest master branch or apply the patch from the next commit to your branch?   * https://github.com/kamailio/kamailio/commit/d50498cf483cd22ac4e62af5aaa86fc27654f640 If possible, test it with both mongo server versions and if works fine with both, then I am going to backp

Re: [SR-Users] kamailio does not start with db_mongdb and usrloc

2018-02-28 Thread Stephane
Hello Daniel, I tried with mongoc 1.8.0 (the trace I have sent) and also mongoc 1.9.2. The result is the same : a "failed to parse" with as indication "unrecognized field 'table_version'" when using mongo server version 3.6.2. Both mongoc versions are running fine with a mongo server version 3.0.

Re: [SR-Users] kamailio does not start with db_mongdb and usrloc

2018-02-28 Thread Daniel-Constantin Mierla
Hello, I see in the pcap that the returned error contains: Failed to parse: { find: "version", filter: { table_name: "location" }, table_version: 1, $readPreference: { mode: "secondaryPreferred" }, $db: "kamailio" }. Unrecognized field 'table_version'. What is the version of mongoc library? I tr

Re: [SR-Users] kamailio does not start with db_mongdb and usrloc

2018-02-27 Thread Stephane
Hello Daniel, You will find two pcap files in attachment. I am using the same mongoc library version in both cases. Let me know if you need more info. Kind regards, Stephane On 27 February 2018 at 09:01, Daniel-Constantin Mierla wrote: > Hello, > > can you send here the requests sent by kamail

Re: [SR-Users] kamailio does not start with db_mongdb and usrloc

2018-02-27 Thread Daniel-Constantin Mierla
Hello, can you send here the requests sent by kamailio for the two mongodb versions? To compare and see where it can be fixed. Also, were you using the same mongoc library version in both cases? Cheers, Daniel On 26.02.18 12:57, Stephane wrote: > Hello, > I made some additional tests.  > The p

Re: [SR-Users] kamailio does not start with db_mongdb and usrloc

2018-02-26 Thread Stephane
Hello, I made some additional tests. The problem is only present when kamailio is facing mongo release 3.2 (or higher). With mongo version 3.0 (or lower), the request sent by kamailio is different: it contains $query and $table_version elements and mongo accepts it. Kind regards, Stephane On 23 Fe

Re: [SR-Users] kamailio does not start with db_mongdb and usrloc

2018-02-23 Thread Stephane
Hello Daniel, I took a pcap trace. And I see the following in the answer sent by mongo Failed to parse: { find: "version", filter: { table_name: "location" }, table_version: 1, $db: "kamailio", $readPreference: { mode: "primaryPreferred" }, $clusterTime: { clusterTime: Timestamp(1519379980, 1), s

Re: [SR-Users] kamailio does not start with db_mongdb and usrloc

2018-02-23 Thread Daniel-Constantin Mierla
Hello, I don't know if you can see the result sent back by mongodb in its logs, it doesn't show it there. Maybe you can sniff the traffic on the network and see if mongodb sends the proper response back. Kamailio logs like nothing was retrieved. Cheers, Daniel On 22.02.18 18:02, Stephane Focant

[SR-Users] kamailio does not start with db_mongdb and usrloc

2018-02-22 Thread Stephane Focant
Hello, I have an issue when I try to use kamailio 5.1 with usrloc and db_mongdb modules. When I try to start kamailio, I get the following error: 0(22216) DEBUG: [db.c:314]: db_do_init2(): connection 0x7f735b5c4100 not found in pool 0(22216) DEBUG: db_mongodb [mongodb_connection.c:55]: db_mongod