Re: [SR-Users] db_mongodb_get_columns(): field [username] not found in result iterator

2018-11-06 Thread Denys Pozniak
Added also:
rs0:PRIMARY> db.getCollection("version").insert({table_name: "domain",
table_version: NumberInt(2) })

And now Kamailio works!
Thanks!


вт, 6 нояб. 2018 г. в 11:57, Denys Pozniak :

> Hello!
>
> According to this tutorial (
> https://www.kamailio.org/wiki/tutorials/kamailio-and-mongodb ) I need to
> create table version only, but looks like Kamailio expects location table
> also:
>
> Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR:  [db.c:450]:
> db_check_table_version(): invalid version 0 for table location found,
> expected 9 (check table structure and table "version")
> Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR: usrloc [dlist.c:649]:
> register_udomain(): error during table version check.
> Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR: registrar
> [registrar.c:651]: domain_fixup(): failed to register domain
> Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR: 
> [core/route.c:1154]: fix_actions(): fixing failed (code=-1) at
> cfg:/etc/kamailio/routing.d/auth.cfg:53
> Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR: 
> [core/rvalue.c:3860]: fix_rval_expr(): failure in cfg at line: 53 col: 44
> Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR: 
> [core/rvalue.c:3860]: fix_rval_expr(): failure in cfg at line: 53 col: 44
> Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR: 
> [core/route.c:1154]: fix_actions(): fixing failed (code=-1) at
> cfg:/etc/kamailio/routing.d/auth.cfg:55
> Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR: 
> [core/route.c:1154]: fix_actions(): fixing failed (code=-1) at
> cfg:/etc/kamailio/routing.d/auth.cfg:86
>
>
>
>
>
> пн, 5 нояб. 2018 г. в 19:16, Daniel-Constantin Mierla :
>
>> Hello,
>>
>> that file you get with wget is sort of schema definition, but doesn't
>> have to be imported in mongo. Delete it, only Kamailio should insert into
>> location table.
>>
>> Cheers,
>> Daniel
>>
>> On 05.11.18 16:23, Denys Pozniak wrote:
>>
>> My steps:
>> 1) wget
>> https://raw.githubusercontent.com/kamailio/kamailio/master/utils/kamctl/mongodb/kamailio/location.json
>>
>> 2)[root@mongodb-1 root]# mongoimport --db test --collection
>> location --file location.json -
>>
>> 2018-11-05T16:17:30.422+0100using 1 decoding workers
>> 2018-11-05T16:17:30.422+0100using 1 insert workers
>> 2018-11-05T16:17:30.423+0100filesize: 2131 bytes
>> 2018-11-05T16:17:30.423+0100using fields:
>> 2018-11-05T16:17:30.424+0100will listen for SIGTERM, SIGINT, and
>> SIGKILL
>> 2018-11-05T16:17:30.428+0100connected to: localhost
>> 2018-11-05T16:17:30.428+0100ns: test.location
>> 2018-11-05T16:17:30.428+0100connected to node type: replset
>> 2018-11-05T16:17:30.428+0100using write concern: w='majority',
>> j=false, fsync=false, wtimeout=0
>> 2018-11-05T16:17:30.428+0100using write concern: w='majority',
>> j=false, fsync=false, wtimeout=0
>> 2018-11-05T16:17:30.428+0100Failed: error processing document #1:
>> invalid character ':' after array element
>> 2018-11-05T16:17:30.428+0100imported 0 documents
>>
>>
>> 3) Tested with JSON validator and the same:
>>
>> Results
>>
>> Error: Parse error on line 5:
>> ...  "columns": ["id": { "type": "int"
>> --^
>>
>> Expecting 'EOF', '}', ',', ']', got ':'
>>
>> 4) Changed  manually
>>
>> "columns": [  -->   "columns": {
>>  ] -- > }
>>
>>
>> 5)[root@mongodb-1 root]# mongoimport --db test --collection
>> location --file location.json -
>>
>> 2018-11-05T16:21:11.454+0100using 1 decoding workers
>> 2018-11-05T16:21:11.455+0100using 1 insert workers
>> 2018-11-05T16:21:11.455+0100filesize: 2132 bytes
>> 2018-11-05T16:21:11.456+0100using fields:
>> 2018-11-05T16:21:11.456+0100will listen for SIGTERM, SIGINT, and
>> SIGKILL
>> 2018-11-05T16:21:11.460+0100connected to: localhost
>> 2018-11-05T16:21:11.460+0100ns: test.location
>> 2018-11-05T16:21:11.461+0100connected to node type: replset
>> 2018-11-05T16:21:11.461+0100using write concern: w='majority',
>> j=false, fsync=false, wtimeout=0
>> 2018-11-05T16:21:11.461+0100using write concern: w='majority',
>> j=false, fsync=false, wtimeout=0
>> 2018-11-05T16:21:11.463+0100got line: [{name location} {version 9}
>> {columns [{id [{type int} {default } {null false}]} {ruid [{type
>> string} {default } {null false}]} {username [{type string} {default } {null
>> false}]} {domain [{type string} {default } {null true}]} {contact
>> [{type string} {default } {null false}]} {received [{type string} {default
>> } {null true}]} {path [{type string} {default } {null true}]}
>> {expires [{type datetime} {default 2030-05-28 21:32:15} {null false}]} {q
>> [{type double} {default 1} {null false}]} {callid [{type string} {default
>> Default-Call-ID} {null false}]} {cseq [{type int} {default 1} {null
>> false}]} {last_modified [{type datetime} {default 2000-01-01 00:00:01}
>> {null false}]} {flags [{type int} {default 0} {null false}]} {cflags 

Re: [SR-Users] db_mongodb_get_columns(): field [username] not found in result iterator

2018-11-06 Thread Denys Pozniak
Hello!

According to this tutorial (
https://www.kamailio.org/wiki/tutorials/kamailio-and-mongodb ) I need to
create table version only, but looks like Kamailio expects location table
also:

Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR:  [db.c:450]:
db_check_table_version(): invalid version 0 for table location found,
expected 9 (check table structure and table "version")
Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR: usrloc [dlist.c:649]:
register_udomain(): error during table version check.
Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR: registrar
[registrar.c:651]: domain_fixup(): failed to register domain
Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR: 
[core/route.c:1154]: fix_actions(): fixing failed (code=-1) at
cfg:/etc/kamailio/routing.d/auth.cfg:53
Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR: 
[core/rvalue.c:3860]: fix_rval_expr(): failure in cfg at line: 53 col: 44
Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR: 
[core/rvalue.c:3860]: fix_rval_expr(): failure in cfg at line: 53 col: 44
Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR: 
[core/route.c:1154]: fix_actions(): fixing failed (code=-1) at
cfg:/etc/kamailio/routing.d/auth.cfg:55
Nov  6 10:48:44 dev /usr/sbin/kamailio[2823]: ERROR: 
[core/route.c:1154]: fix_actions(): fixing failed (code=-1) at
cfg:/etc/kamailio/routing.d/auth.cfg:86





пн, 5 нояб. 2018 г. в 19:16, Daniel-Constantin Mierla :

> Hello,
>
> that file you get with wget is sort of schema definition, but doesn't have
> to be imported in mongo. Delete it, only Kamailio should insert into
> location table.
>
> Cheers,
> Daniel
>
> On 05.11.18 16:23, Denys Pozniak wrote:
>
> My steps:
> 1) wget
> https://raw.githubusercontent.com/kamailio/kamailio/master/utils/kamctl/mongodb/kamailio/location.json
>
> 2)[root@mongodb-1 root]# mongoimport --db test --collection
> location --file location.json -
>
> 2018-11-05T16:17:30.422+0100using 1 decoding workers
> 2018-11-05T16:17:30.422+0100using 1 insert workers
> 2018-11-05T16:17:30.423+0100filesize: 2131 bytes
> 2018-11-05T16:17:30.423+0100using fields:
> 2018-11-05T16:17:30.424+0100will listen for SIGTERM, SIGINT, and
> SIGKILL
> 2018-11-05T16:17:30.428+0100connected to: localhost
> 2018-11-05T16:17:30.428+0100ns: test.location
> 2018-11-05T16:17:30.428+0100connected to node type: replset
> 2018-11-05T16:17:30.428+0100using write concern: w='majority',
> j=false, fsync=false, wtimeout=0
> 2018-11-05T16:17:30.428+0100using write concern: w='majority',
> j=false, fsync=false, wtimeout=0
> 2018-11-05T16:17:30.428+0100Failed: error processing document #1:
> invalid character ':' after array element
> 2018-11-05T16:17:30.428+0100imported 0 documents
>
>
> 3) Tested with JSON validator and the same:
>
> Results
>
> Error: Parse error on line 5:
> ...   "columns": ["id": { "type": "int"
> --^
>
> Expecting 'EOF', '}', ',', ']', got ':'
>
> 4) Changed  manually
>
> "columns": [  -->   "columns": {
>  ] -- > }
>
>
> 5)[root@mongodb-1 root]# mongoimport --db test --collection
> location --file location.json -
>
> 2018-11-05T16:21:11.454+0100using 1 decoding workers
> 2018-11-05T16:21:11.455+0100using 1 insert workers
> 2018-11-05T16:21:11.455+0100filesize: 2132 bytes
> 2018-11-05T16:21:11.456+0100using fields:
> 2018-11-05T16:21:11.456+0100will listen for SIGTERM, SIGINT, and
> SIGKILL
> 2018-11-05T16:21:11.460+0100connected to: localhost
> 2018-11-05T16:21:11.460+0100ns: test.location
> 2018-11-05T16:21:11.461+0100connected to node type: replset
> 2018-11-05T16:21:11.461+0100using write concern: w='majority',
> j=false, fsync=false, wtimeout=0
> 2018-11-05T16:21:11.461+0100using write concern: w='majority',
> j=false, fsync=false, wtimeout=0
> 2018-11-05T16:21:11.463+0100got line: [{name location} {version 9}
> {columns [{id [{type int} {default } {null false}]} {ruid [{type
> string} {default } {null false}]} {username [{type string} {default } {null
> false}]} {domain [{type string} {default } {null true}]} {contact
> [{type string} {default } {null false}]} {received [{type string} {default
> } {null true}]} {path [{type string} {default } {null true}]}
> {expires [{type datetime} {default 2030-05-28 21:32:15} {null false}]} {q
> [{type double} {default 1} {null false}]} {callid [{type string} {default
> Default-Call-ID} {null false}]} {cseq [{type int} {default 1} {null
> false}]} {last_modified [{type datetime} {default 2000-01-01 00:00:01}
> {null false}]} {flags [{type int} {default 0} {null false}]} {cflags [{type
> int} {default 0} {null false}]} {user_agent [{type string} {default } {null
> false}]} {socket [{type string} {default } {null true}]} {methods
> [{type int} {default } {null true}]} {instance [{type string} {default
> } {null true}]} {reg_id [{type int} {default 0} {null false}]}
> {server_id [{type int} {default 0} {null 

Re: [SR-Users] db_mongodb_get_columns(): field [username] not found in result iterator

2018-11-05 Thread Daniel-Constantin Mierla
Hello,

that file you get with wget is sort of schema definition, but doesn't
have to be imported in mongo. Delete it, only Kamailio should insert
into location table.

Cheers,
Daniel


On 05.11.18 16:23, Denys Pozniak wrote:
> My steps:
> 1) wget
> https://raw.githubusercontent.com/kamailio/kamailio/master/utils/kamctl/mongodb/kamailio/location.json
>
> 2)        [root@mongodb-1 root]# mongoimport --db test --collection
> location --file location.json -
>
> 2018-11-05T16:17:30.422+0100    using 1 decoding workers
> 2018-11-05T16:17:30.422+0100    using 1 insert workers
> 2018-11-05T16:17:30.423+0100    filesize: 2131 bytes
> 2018-11-05T16:17:30.423+0100    using fields:
> 2018-11-05T16:17:30.424+0100    will listen for SIGTERM, SIGINT,
> and SIGKILL
> 2018-11-05T16:17:30.428+0100    connected to: localhost
> 2018-11-05T16:17:30.428+0100    ns: test.location
> 2018-11-05T16:17:30.428+0100    connected to node type: replset
> 2018-11-05T16:17:30.428+0100    using write concern: w='majority',
> j=false, fsync=false, wtimeout=0
> 2018-11-05T16:17:30.428+0100    using write concern: w='majority',
> j=false, fsync=false, wtimeout=0
> 2018-11-05T16:17:30.428+0100    Failed: error processing document
> #1: invalid character ':' after array element
> 2018-11-05T16:17:30.428+0100    imported 0 documents
>
>
> 3) Tested with JSON validator and the same:
>
>
>   Results
>
> Error: Parse error on line 5:
> ...   "columns": ["id": { "type": "int"
> --^ 
> Expecting 'EOF', '}', ',', ']', got ':'
>
> 4) Changed  manually
>
> "columns": [  -->   "columns": { 
>  ] -- > }
>
>
> 5)        [root@mongodb-1 root]# mongoimport --db test --collection
> location --file location.json -
>
> 2018-11-05T16:21:11.454+0100    using 1 decoding workers
> 2018-11-05T16:21:11.455+0100    using 1 insert workers
> 2018-11-05T16:21:11.455+0100    filesize: 2132 bytes
> 2018-11-05T16:21:11.456+0100    using fields:
> 2018-11-05T16:21:11.456+0100    will listen for SIGTERM, SIGINT,
> and SIGKILL
> 2018-11-05T16:21:11.460+0100    connected to: localhost
> 2018-11-05T16:21:11.460+0100    ns: test.location
> 2018-11-05T16:21:11.461+0100    connected to node type: replset
> 2018-11-05T16:21:11.461+0100    using write concern: w='majority',
> j=false, fsync=false, wtimeout=0
> 2018-11-05T16:21:11.461+0100    using write concern: w='majority',
> j=false, fsync=false, wtimeout=0
> 2018-11-05T16:21:11.463+0100    got line: [{name location}
> {version 9} {columns [{id [{type int} {default } {null
> false}]} {ruid [{type string} {default } {null false}]} {username
> [{type string} {default } {null false}]} {domain [{type string}
> {default } {null true}]} {contact [{type string} {default }
> {null false}]} {received [{type string} {default } {null
> true}]} {path [{type string} {default } {null true}]}
> {expires [{type datetime} {default 2030-05-28 21:32:15} {null
> false}]} {q [{type double} {default 1} {null false}]} {callid
> [{type string} {default Default-Call-ID} {null false}]} {cseq
> [{type int} {default 1} {null false}]} {last_modified [{type
> datetime} {default 2000-01-01 00:00:01} {null false}]} {flags
> [{type int} {default 0} {null false}]} {cflags [{type int}
> {default 0} {null false}]} {user_agent [{type string} {default }
> {null false}]} {socket [{type string} {default } {null
> true}]} {methods [{type int} {default } {null true}]}
> {instance [{type string} {default } {null true}]} {reg_id
> [{type int} {default 0} {null false}]} {server_id [{type int}
> {default 0} {null false}]} {connection_id [{type int} {default 0}
> {null false}]} {keepalive [{type int} {default 0} {null false}]}
> {partition [{type int} {default 0} {null false}]}]}]
> 2018-11-05T16:21:11.464+0100    got extended line:
> bson.D{bson.DocElem{Name:"name", Value:"location"},
> bson.DocElem{Name:"version", Value:9},
> bson.DocElem{Name:"columns", Value:bson.D{bson.DocElem{Name:"id",
> Value:bson.D{bson.DocElem{Name:"type", Value:"int"},
> bson.DocElem{Name:"default", Value:interface {}(nil)},
> bson.DocElem{Name:"null", Value:false}}},
> bson.DocElem{Name:"ruid", Value:bson.D{bson.DocElem{Name:"type",
> Value:"string"}, bson.DocElem{Name:"default", Value:""},
> bson.DocElem{Name:"null", Value:false}}},
> bson.DocElem{Name:"username",
> Value:bson.D{bson.DocElem{Name:"type", Value:"string"},
> bson.DocElem{Name:"default", Value:""}, bson.DocElem{Name:"null",
> Value:false}}}, bson.DocElem{Name:"domain",
> Value:bson.D{bson.DocElem{Name:"type", Value:"string"},
> bson.DocElem{Name:"default", Value:interface {}(nil)},
> bson.DocElem{Name:"null", Value:true}}},
> bson.DocElem{Name:"contact",
> Value:bson.D{bson.DocElem{Name:"type", 

Re: [SR-Users] db_mongodb_get_columns(): field [username] not found in result iterator

2018-11-05 Thread Denys Pozniak
My steps:
1) wget
https://raw.githubusercontent.com/kamailio/kamailio/master/utils/kamctl/mongodb/kamailio/location.json

2)[root@mongodb-1 root]# mongoimport --db test --collection
location --file location.json -

2018-11-05T16:17:30.422+0100using 1 decoding workers
2018-11-05T16:17:30.422+0100using 1 insert workers
2018-11-05T16:17:30.423+0100filesize: 2131 bytes
2018-11-05T16:17:30.423+0100using fields:
2018-11-05T16:17:30.424+0100will listen for SIGTERM, SIGINT, and SIGKILL
2018-11-05T16:17:30.428+0100connected to: localhost
2018-11-05T16:17:30.428+0100ns: test.location
2018-11-05T16:17:30.428+0100connected to node type: replset
2018-11-05T16:17:30.428+0100using write concern: w='majority', j=false,
fsync=false, wtimeout=0
2018-11-05T16:17:30.428+0100using write concern: w='majority', j=false,
fsync=false, wtimeout=0
2018-11-05T16:17:30.428+0100Failed: error processing document #1:
invalid character ':' after array element
2018-11-05T16:17:30.428+0100imported 0 documents


3) Tested with JSON validator and the same:

Results

Error: Parse error on line 5:
... "columns": ["id": { "type": "int"
--^

Expecting 'EOF', '}', ',', ']', got ':'

4) Changed  manually

"columns": [  -->   "columns": {
 ] -- > }


5)[root@mongodb-1 root]# mongoimport --db test --collection
location --file location.json -

2018-11-05T16:21:11.454+0100using 1 decoding workers
2018-11-05T16:21:11.455+0100using 1 insert workers
2018-11-05T16:21:11.455+0100filesize: 2132 bytes
2018-11-05T16:21:11.456+0100using fields:
2018-11-05T16:21:11.456+0100will listen for SIGTERM, SIGINT, and SIGKILL
2018-11-05T16:21:11.460+0100connected to: localhost
2018-11-05T16:21:11.460+0100ns: test.location
2018-11-05T16:21:11.461+0100connected to node type: replset
2018-11-05T16:21:11.461+0100using write concern: w='majority', j=false,
fsync=false, wtimeout=0
2018-11-05T16:21:11.461+0100using write concern: w='majority', j=false,
fsync=false, wtimeout=0
2018-11-05T16:21:11.463+0100got line: [{name location} {version 9}
{columns [{id [{type int} {default } {null false}]} {ruid [{type
string} {default } {null false}]} {username [{type string} {default } {null
false}]} {domain [{type string} {default } {null true}]} {contact
[{type string} {default } {null false}]} {received [{type string} {default
} {null true}]} {path [{type string} {default } {null true}]}
{expires [{type datetime} {default 2030-05-28 21:32:15} {null false}]} {q
[{type double} {default 1} {null false}]} {callid [{type string} {default
Default-Call-ID} {null false}]} {cseq [{type int} {default 1} {null
false}]} {last_modified [{type datetime} {default 2000-01-01 00:00:01}
{null false}]} {flags [{type int} {default 0} {null false}]} {cflags [{type
int} {default 0} {null false}]} {user_agent [{type string} {default } {null
false}]} {socket [{type string} {default } {null true}]} {methods
[{type int} {default } {null true}]} {instance [{type string} {default
} {null true}]} {reg_id [{type int} {default 0} {null false}]}
{server_id [{type int} {default 0} {null false}]} {connection_id [{type
int} {default 0} {null false}]} {keepalive [{type int} {default 0} {null
false}]} {partition [{type int} {default 0} {null false}]}]}]
2018-11-05T16:21:11.464+0100got extended line:
bson.D{bson.DocElem{Name:"name", Value:"location"},
bson.DocElem{Name:"version", Value:9}, bson.DocElem{Name:"columns",
Value:bson.D{bson.DocElem{Name:"id", Value:bson.D{bson.DocElem{Name:"type",
Value:"int"}, bson.DocElem{Name:"default", Value:interface {}(nil)},
bson.DocElem{Name:"null", Value:false}}}, bson.DocElem{Name:"ruid",
Value:bson.D{bson.DocElem{Name:"type", Value:"string"},
bson.DocElem{Name:"default", Value:""}, bson.DocElem{Name:"null",
Value:false}}}, bson.DocElem{Name:"username",
Value:bson.D{bson.DocElem{Name:"type", Value:"string"},
bson.DocElem{Name:"default", Value:""}, bson.DocElem{Name:"null",
Value:false}}}, bson.DocElem{Name:"domain",
Value:bson.D{bson.DocElem{Name:"type", Value:"string"},
bson.DocElem{Name:"default", Value:interface {}(nil)},
bson.DocElem{Name:"null", Value:true}}}, bson.DocElem{Name:"contact",
Value:bson.D{bson.DocElem{Name:"type", Value:"string"},
bson.DocElem{Name:"default", Value:""}, bson.DocElem{Name:"null",
Value:false}}}, bson.DocElem{Name:"received",
Value:bson.D{bson.DocElem{Name:"type", Value:"string"},
bson.DocElem{Name:"default", Value:interface {}(nil)},
bson.DocElem{Name:"null", Value:true}}}, bson.DocElem{Name:"path",
Value:bson.D{bson.DocElem{Name:"type", Value:"string"},
bson.DocElem{Name:"default", Value:interface {}(nil)},
bson.DocElem{Name:"null", Value:true}}}, bson.DocElem{Name:"expires",
Value:bson.D{bson.DocElem{Name:"type", Value:"datetime"},
bson.DocElem{Name:"default", Value:"2030-05-28 21:32:15"},
bson.DocElem{Name:"null", Value:false}}}, bson.DocElem{Name:"q",

Re: [SR-Users] db_mongodb_get_columns(): field [username] not found in result iterator

2018-11-05 Thread Daniel-Constantin Mierla
Hello,

how was the record (json document) inserted in the location table? It
doesn't seem to have valid values...

Cheers,
Daniel


On 05.11.18 13:13, Denys Pozniak wrote:
> Hello!
>
> I want to keep user location in mongodb, but Kamailio does not start well.
>
> Configuration:
>
> loadmodule "usrloc.so"
> loadmodule "db_mongodb.so"
> modparam("usrloc", "db_insert_null", 1)
> modparam("usrloc", "db_url", "mongodb://mongodb.test/kamailio")
> modparam("usrloc", "db_mode", 2)
> modparam("usrloc", "timer_interval", 30)
> modparam("usrloc", "desc_time_order", 1)
>
>
> Mongodb:
>
> rs0:PRIMARY> use kamailio
> switched to db kamailio
> rs0:PRIMARY> db.location.find()
> { "_id" : ObjectId("5be024d6b9d8febf4ae19681"), "name" : "location",
> "version" : 9, "columns" : { "id" : { "type" : "int", "default" :
> null, "null" : false }, "ruid" : { "type" : "string", "default" : "",
> "null" : false }, "username" : { "type" : "string", "default" : "",
> "null" : false }, "domain" : { "type" : "string", "default" : null,
> "null" : true }, "contact" : { "type" : "string", "default" : "",
> "null" : false }, "received" : { "type" : "string", "default" : null,
> "null" : true }, "path" : { "type" : "string", "default" : null,
> "null" : true }, "expires" : { "type" : "datetime", "default" :
> "2030-05-28 21:32:15", "null" : false }, "q" : { "type" : "double",
> "default" : 1, "null" : false }, "callid" : { "type" : "string",
> "default" : "Default-Call-ID", "null" : false }, "cseq" : { "type" :
> "int", "default" : 1, "null" : false }, "last_modified" : { "type" :
> "datetime", "default" : "2000-01-01 00:00:01", "null" : false },
> "flags" : { "type" : "int", "default" : 0, "null" : false }, "cflags"
> : { "type" : "int", "default" : 0, "null" : false }, "user_agent" : {
> "type" : "string", "default" : "", "null" : false }, "socket" : {
> "type" : "string", "default" : null, "null" : true }, "methods" : {
> "type" : "int", "default" : null, "null" : true }, "instance" : {
> "type" : "string", "default" : null, "null" : true }, "reg_id" : {
> "type" : "int", "default" : 0, "null" : false }, "server_id" : {
> "type" : "int", "default" : 0, "null" : false }, "connection_id" : {
> "type" : "int", "default" : 0, "null" : false }, "keepalive" : {
> "type" : "int", "default" : 0, "null" : false }, "partition" : {
> "type" : "int", "default" : 0, "null" : false } } }
> { "_id" : ObjectId("5be02a77175610be86a1a589"), "username" :
> "dummy_user" }
>
>
> Syslog:
>
> Nov  5 12:51:01 dev-rtpengine /usr/sbin/kamailio[21543]: ERROR:
> db_mongodb [mongodb_dbase.c:416]: db_mongodb_get_columns(): field
> [username] not found in result iterator
> Nov  5 12:51:01 dev-rtpengine /usr/sbin/kamailio[21543]: ERROR:
> db_mongodb [mongodb_dbase.c:815]: db_mongodb_store_result(): failed to
> set the columns
> Nov  5 12:51:01 dev-rtpengine /usr/sbin/kamailio[21543]: ERROR:
> db_mongodb [mongodb_dbase.c:1018]: db_mongodb_query(): failed to store
> result
> Nov  5 12:51:01 dev-rtpengine /usr/sbin/kamailio[21543]: ERROR:
> db_mongodb [mongodb_dbase.c:1027]: db_mongodb_query(): failed to do
> the query
> Nov  5 12:51:01 dev-rtpengine /usr/sbin/kamailio[21543]: ERROR: usrloc
> [udomain.c:457]: preload_udomain(): db_query failed
> Nov  5 12:51:01 dev-rtpengine /usr/sbin/kamailio[21543]: ERROR: usrloc
> [usrloc_mod.c:430]: child_init(): child(1): failed to preload domain
> 'location'
> Nov  5 12:51:01 dev-rtpengine /usr/sbin/kamailio[21543]: ERROR: 
> [core/sr_module.c:946]: init_mod_child(): error while initializing
> module usrloc (/usr/lib64/kamailio/modules/usrloc.so) (idx: 1 rank: 1
> desc: [udp receiver child=0 sock=10.10.10.10:5060
> ])
> Nov  5 12:51:01 dev-rtpengine /usr/sbin/kamailio[21543]: ERROR: 
> [core/pt.c:340]: fork_process(): init_child failed for process 1, pid
> 21543, "udp receiver child=0 sock=10.10.10.10:5060
> "
> Nov  5 12:51:01 dev-rtpengine /usr/sbin/kamailio[21543]: CRITICAL:
>  [main.c:1607]: main_loop(): Cannot fork
>
>
> 2018-11-05T13:07:19.117+0100 D COMMAND  [conn367] run command
> kamailio.$cmd { find: "version", filter: { table_name: "location" },
> projection: { table_version: 1 } }
> 2018-11-05T13:07:19.118+0100 I COMMAND  [conn367] command
> kamailio.version command: find { find: "version", filter: {
> table_name: "location" }, projection: { table_version: 1 } }
> planSummary: COLLSCAN keysExamined:0 docsExamined:2 cursorExhausted:1
> numYields:0 nreturned:1 reslen:148 locks:{ Global: { acquireCount: {
> r: 2 } }, Database: { acquireCount: { r: 1 } }, Collection: {
> acquireCount: { r: 1 } } } protocol:op_query 0ms
> 2018-11-05T13:07:19.118+0100 D COMMAND  [conn367] run command
> kamailio.$cmd { find: "location", filter: { username: "dummy_user" },
> projection: { username: 1 } }
> 2018-11-05T13:07:19.119+0100 I COMMAND  [conn367] command
> kamailio.location command: find { find: "location", filter: {
> username: "dummy_user" }, projection: { username: 1 } } planSummary: