<div dir="ltr">HI Guys ,<div><br></div><div>     i am trying to use mongodb in replica set . I have tested my opensips-1.11 with a stand alone mongodb instance . Its working fine .</div><div><br></div><div>       Now I am trying to connect to a replica set . But somehow I amnot able to do this . Opensips is getting connected to the replica set but its not able to run raw query .</div><div> </div><div> My opensips configuration is like bellow :</div><div><br></div><div>loadmodule &quot;cachedb_mongodb.so&quot;</div><div>loadmodule &quot;db_cachedb.so&quot;      </div><div><div>modparam(&quot;cachedb_mongodb&quot;, &quot;cachedb_url&quot;,&quot;mongodb:replicaset1://<a href="http://root:password@1.2.3.4:27017">root:password@1.2.3.4:27017</a>,<a href="http://2.3.4.5:27017/jack.db.CallCenter_Info">2.3.4.5:27017/jack.db.CallCenter_Info</a>&quot;)</div><div>modparam(&quot;db_cachedb&quot;,&quot;cachedb_url&quot;,&quot;mongodb:replicaset1://<a href="http://root:password@1.2.3.4:27017">root:password@1.2.3.4:27017</a>,<a href="http://2.3.4.5:27017/jack.db.test">2.3.4.5:27017/jack.db.test</a>&quot;)</div></div><div><br></div><div><div>modparam(&quot;acc&quot;, &quot;db_url&quot;, &quot;cachedb://mongodb:replicaset1&quot;)</div><div>modparam(&quot;acc&quot;, &quot;db_flag&quot;, 2)</div><div>modparam(&quot;acc&quot;, &quot;log_flag&quot;, 2)</div><div>modparam(&quot;acc&quot;, &quot;cdr_flag&quot;, 1)</div><div>modparam(&quot;acc&quot;, &quot;log_facility&quot;, &quot;LOG_LOCAL7&quot;)</div></div><div><br></div><div><br></div><div>Opensips is not able to execute version check query for acc module .  Bellow is the logs of opensips .</div><div><br></div><div>    INFO:cachedb_mongodb:mongo_new_connection: Connected at server <a href="http://52.71.216.67:27017">52.71.216.67:27017</a>,<a href="http://23.21.65.168:27017">23.21.65.168:27017</a> with version 3.0.12 , to db db.test</div><div> DBG:db_cachedb:db_cachedb_init: Succesfully initiated connection to [mongodb:replicaset1]</div><div> DBG:cachedb_mongodb:mongo_db_query_trans: Running raw mongo query on table db.my_version_table</div><div> ERROR:cachedb_mongodb:mongo_db_query_trans: Failed to run query. Err = 0, 0 , 0</div><div> DBG:cachedb_mongodb:mongo_db_query_trans: Fetched key lastOp</div><div> DBG:cachedb_mongodb:mongo_db_query_trans: (unknown type 17)</div><div> DBG:cachedb_mongodb:mongo_db_query_trans: Fetched key connectionId</div><div> DBG:cachedb_mongodb:mongo_db_query_trans: (int) 516</div><div> DBG:cachedb_mongodb:mongo_db_query_trans: Fetched key n</div><div> DBG:cachedb_mongodb:mongo_db_query_trans: (int) 0</div><div> DBG:cachedb_mongodb:mongo_db_query_trans: Fetched key syncMillis</div><div> DBG:cachedb_mongodb:mongo_db_query_trans: (int) 0</div><div> DBG:core:wait_status_code: read code 0 ? rc = 0, errno=Success</div><div> INFO:core:daemonize: pre-daemon process exiting with -1</div><div><br></div><div><br></div><div>       In my mongodb instance there is some error printing also .</div><div><div>[initandlisten] connection accepted from <a href="http://104.131.6.7:35857">104.131.6.7:35857</a> #565 (7 connections now open)</div><div>2016-06-01T10:09:14.802+0000 I QUERY    [conn565] assertion 13 not authorized for query on db.my_version_table ns:db.my_version_table query:{ $query: { table_name: &quot;acc&quot; } }</div></div><div><br></div><div>       By login through a remote machine with same username and password . I am able to execute all query manually . But why my opensips cant do this . If anybody have tried this can you suggest me any solution . What else I should do in my replica set or in opensips to make it happen ?</div><div><br></div><div>     Please help me . As I am quite new to mongodb replica set so not able to understand the actual problem also .</div><div><br></div><div><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><b><i>Thanks &amp; Regards</i></b><div><i>Sasmita Panda</i></div><div><i>Network Testing and Software Engineer</i></div><div><i>3CLogic , ph:07827611765</i></div></div></div></div>
</div></div>