[OpenSIPS-Users] Need help to connect AWS document db through opensips 3.0 .

Sasmita Panda spanda at 3clogic.com
Mon Sep 23 07:03:59 EDT 2019


Hi Liviu ,

My document DB is act like a  cluster . I have created only 1 instance in
the cluster which has write/read permission and is the primary instance .

DocumentDB says this is the way to connect to the Db from remote
application .
cluster : mongodb://master:<insertYourPassword>@
docdb-xxx.cluster-c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017/?ssl=true&ssl_ca_certs=rds-combined-ca-bundle.pem&replicaSet=rs0
instance : mongodb://master:<insertYourPassword>@
docdb-xxx.c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017/?ssl=true&ssl_ca_certs=rds-combined-ca-bundle.pem

In my config I had set this URL for , cachedb_mongodb , db_cachedb and also
usrloc .

modparam("usrloc", "cachedb_url","mongodb://
master:cluster2018 at docdb-xxx.c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017/opensipsDB.userlocation
?ssl=true&ssl_ca_certs=rds-combined-ca-bundle.pem")

Error in the log :
 ERROR:cachedb_mongodb:mongo_con_update: last error: 15.13053: No suitable
servers found (`serverSelectionTryOnce` set):
 [TLS handshake failed: error:1416F086:SSL
routines:tls_process_server_certificate:certificate verify failed calling
ismaster on 'docdb-xxx.c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017']

With same credentials I am able to connect to the doc db from console and
its connect to rs0:PRIMARY> . I am able to create DB , collection , insert
data in collection and read the data also .

where I am doing mistake .

*Thanks & Regards*
*Sasmita Panda*
*Senior Network Testing and Software Engineer*
*3CLogic , ph:07827611765*


On Fri, Sep 20, 2019 at 6:02 PM Liviu Chircu <liviu at opensips.org> wrote:

> It looks like you are connecting to a single node (which is SECONDARY),
> rather than a replica set,
> so the driver is unable to locate a PRIMARY node, to which it can issue
> writes.
>
> What does your DocumentDB infrastructure look like?  Is it a replica set?
> A single instance?
>
> Liviu Chircu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 16.09.2019 10:35, Sasmita Panda wrote:
>
> The new core file is given below in pastebin
>
> https://pastebin.com/zMpf12MQ
>
>
> Rather than this , I was trying to upgrade mongo c library to 1.9 and
> running with document DB .
>
> Here I am not able to connect to Document DB . its giving below error
> When I am connecting with SSL=true
>  ERROR:cachedb_mongodb:mongo_con_update: last error: 15.13053: No suitable
> servers found (`serverSelectionTryOnce` set): [TLS handshake failed:
> error:1416F086:SSL routines:tls_process_server_certificate:certificate
> verify failed calling ismaster on '
> docdb-2019-09-14-06-14-132.c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017
> ']
>
> When I am doing without ssl
> ERROR:cachedb_mongodb:mongo_con_update: last error: 1.11: Authentication
> failed.
>
> In both the cases I am able to connect to the Doc DB from the instance
> console . But in opensips its giving such error . Opensips is not crashing
> although .  Why is this error coming . I am not getting this error in the
> code also .
>
> Below is the library version in my instance . and Document db is in same
> 3.6 version .
> dpkg -l | grep -i libmongoc
> ii  libmongoc-1.0-0                      1.9.2+dfsg-1build1
>   amd64        MongoDB C client library - runtime files
> ii  libmongoc-dev                        1.9.2+dfsg-1build1
>   amd64        MongoDB C client library - dev files
>
>
> *Thanks & Regards*
> *Sasmita Panda*
> *Senior Network Testing and Software Engineer*
> *3CLogic , ph:07827611765*
>
>
> On Thu, Sep 12, 2019 at 7:50 PM Liviu Chircu <liviu at opensips.org> wrote:
>
>> Let's follow the official build guide [1], maybe it will make things
>> easier.
>>
>> So make sure to install below requirements, then try again:
>>
>> sudo apt install cmake libssl-dev libsasl2-dev
>>
>> [1]: http://mongoc.org/libmongoc/current/installing.html
>>
>> Liviu Chircu
>> OpenSIPS Developerhttp://www.opensips-solutions.com
>>
>> On 12.09.2019 14:37, Sasmita Panda wrote:
>>
>> make[1]: Entering directory '/opt/mongo-c-driver'
>>   CCLD     test-replica-set
>> /usr/bin/ld: tests/test_replica_set-ha-test.o: undefined reference to
>> symbol 'pthread_once@@GLIBC_2.2.5'
>> //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing
>> from command line
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://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/20190923/de26acc4/attachment.html>


More information about the Users mailing list