[OpenSIPS-Users] mongodb replica set connection .

Răzvan Crainea razvan at opensips.org
Fri Jun 3 13:14:58 CEST 2016


When starting OpenSIPS, are you seeing any INFO logs that contain 
"Connecting to"? Can you turn on the logging and put it on pastebin or 
something?
Regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 06/03/2016 01:26 PM, Sasmita Panda wrote:
> modparam("cachedb_mongodb", 
> "cachedb_url","mongodb:replicaset1://1.2.3.4:27017 
> <http://root:password@1.2.3.4:27017/>,2.3.4.5:27017/jack.db.CallCenter_Info 
> <http://2.3.4.5:27017/jack.db.CallCenter_Info>")
>
> This says , I am using two IPs for the replica set . If its like jack 
> is the data base . In this case If I am setting  " 
> jack.callCenter_Info " , Its  not working , and if I am setting 
> "db.CallCenter_Info" its also not working . Opensips is not even get 
> started in these two cases .
>
> This is the only case what I have written is working .
>
> */Thanks & Regards/*
> /Sasmita Panda/
> /Network Testing and Software Engineer/
> /3CLogic , ph:07827611765/
>
> On Fri, Jun 3, 2016 at 3:50 PM, Răzvan Crainea <razvan at opensips.org 
> <mailto:razvan at opensips.org>> wrote:
>
>     Hi, Sasmita!
>
>     Are you using multiple IPs in the replica set, or only one?
>     Because if you are using only one, the replica set feature is not
>     enabled, and the "jack.db.CallCenter_Info" is treated as database
>     "jack" and collection "db.CallCenter_Info", as in your case. Is
>     this your problem? Are you setting multiple IPs in the cachedb_url?
>
>     Best regards,
>
>     Răzvan Crainea
>     OpenSIPS Solutions
>     www.opensips-solutions.com <http://www.opensips-solutions.com>
>
>     On 06/03/2016 12:01 PM, Sasmita Panda wrote:
>>     I have tried this . But its not working .
>>
>>     Now I got something interesting . I changed the cache_store
>>     command and now its working .
>>     This is " replicasetname.db.collection " this is the format what
>>     I get from opensips documentation .
>>
>>     modparam("cachedb_mongodb",
>>     "cachedb_url","mongodb:replicaset1://1.2.3.4:27017
>>     <http://root:password@1.2.3.4:27017/>,2.3.4.5:27017/jack.db.CallCenter_Info
>>     <http://2.3.4.5:27017/jack.db.CallCenter_Info>")
>>     cache_store("mongodb:replicaset1","$ci","$ci,$var(c)");
>>          What opensips is doing is . Its creating a database jack and
>>     inside that a collection db.CallCenter_Info and storing data on
>>     that collections .
>>
>>          But I have created a database db and i have also created a
>>     collection in that CallCenter_Info  and I was expecting the data
>>     will goes to this collection .
>>
>>          I am doing anything wrong ? I am getting the data so I think
>>     my problem is almost solved . But my acc and sip_trace collection
>>     and CallCenter_Info collection are in different data base  . I
>>     wanted them to present inside a single data base so that it will
>>     be easier for me which searching something  .
>>
>>           Let me know if I am doing anything wrong .
>>
>>           One problem i am facing is , I am not able to connect to
>>     the replica set with authentication . Without authentication its
>>     working like above .
>>
>>
>>     */Thanks & Regards/*
>>     /Sasmita Panda/
>>     /Network Testing and Software Engineer/
>>     /3CLogic , ph:07827611765/
>>
>>     On Fri, Jun 3, 2016 at 12:56 PM, Răzvan Crainea
>>     <razvan at opensips.org <mailto:razvan at opensips.org>> wrote:
>>
>>         Hi, Sasmita!
>>
>>         Are these two the only errors you see in the logs?
>>
>>         Can you confirm that replicaset "jack" exists and that the
>>         "CallCenter_Info" table exists? What about the "db"
>>         collection? Have you tried to set the cachedb_url like this:
>>
>>         modparam("db_cachedb","cachedb_url","mongodb:replicaset1://1.2.3.4:27017
>>         <http://root:password@1.2.3.4:27017/>/jack.db
>>         <http://2.3.4.5:27017/jack.db.test>")
>>
>>         Best regards,
>>
>>         Răzvan Crainea
>>         OpenSIPS Solutions
>>         www.opensips-solutions.com <http://www.opensips-solutions.com>
>>
>>         On 06/02/2016 03:23 PM, Sasmita Panda wrote:
>>>         Hi All ,
>>>
>>>                I am using opensips-1.11 and I am using
>>>         cachedb_mongodb module . I am able to connect to mongodb
>>>         replica set without authentication .
>>>
>>>         modparam("cachedb_mongodb",
>>>         "cachedb_url","mongodb:replicaset1://1.2.3.4:27017
>>>         <http://root:password@1.2.3.4:27017/>,2.3.4.5:27017/jack.db.CallCenter_Info
>>>         <http://2.3.4.5:27017/jack.db.CallCenter_Info>")
>>>
>>>         modparam("db_cachedb","cachedb_url","mongodb:replicaset1://1.2.3.4:27017
>>>         <http://root:password@1.2.3.4:27017/>,2.3.4.5:27017/jack.db.
>>>         <http://2.3.4.5:27017/jack.db.test>db")
>>>
>>>         modparam("acc", "db_url", "cachedb://mongodb:replicaset1")
>>>         I am able to connect to mongodb for account module . By this
>>>         line .
>>>
>>>         But I am not able to store any data through raw query like
>>>         bellow .
>>>         cache_store("mongodb:group1","$ci","$ci,$var(c)");
>>>
>>>         Its giving bellow error .
>>>
>>>          DBG:core:cachedb_store: from script [mongodb] - with grp
>>>         [group1]
>>>         ERROR:core:cachedb_store: failed to get connection for grp
>>>         name [group1]
>>>
>>>
>>>         What does it mean ?  If I am changing the group1 to
>>>         replicaset1 then also its giving error . What should I do ?
>>>         Please help me . Am I doing something wrong in the opensips
>>>         config file or I need to do something in the mongodb replica
>>>         set ?
>>>
>>>         Thanks in advance . any kind of suggestion is welcome .
>>>
>>>         */Thanks & Regards/*
>>>         /Sasmita Panda/
>>>         /Network Testing and Software Engineer/
>>>         /3CLogic , ph:07827611765/
>>>
>>>
>>>         _______________________________________________
>>>         Users mailing list
>>>         Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>>>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>         _______________________________________________
>>         Users mailing list
>>         Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>>
>>     _______________________________________________
>>     Users mailing list
>>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160603/aaff7f7a/attachment-0001.htm>


More information about the Users mailing list