<div dir="ltr">Hi Liviu ,<div><br></div><div>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 .</div><div><br></div><div>DocumentDB says this is the way to connect to the Db from remote application . </div><div><span style="background:unset;background-blend-mode:unset;border:unset;border-radius:unset;display:unset;float:unset;clear:unset;vertical-align:unset;overflow:unset;isolation:unset;break-after:unset;break-before:unset;break-inside:unset;columns:unset;column-fill:unset;column-rule:unset;opacity:unset;mix-blend-mode:unset;font:unset;writing-mode:unset;text-orientation:unset;border-collapse:unset;empty-cells:unset;caption-side:unset;border-spacing:unset;color:unset;text-transform:unset;text-indent:unset;word-break:unset;text-align-last:unset;text-align:unset;letter-spacing:unset;word-spacing:unset;white-space:pre;line-break:unset;text-combine-upright:unset;list-style:unset;quotes:unset;margin:unset;outline:unset;padding:unset;width:unset;min-width:unset;max-width:unset;height:unset;min-height:unset;max-height:unset;box-sizing:unset;object-fit:unset;object-position:unset;table-layout:unset;text-overflow:unset;text-decoration:unset">cluster : mongodb://master:<insertYourPassword>@<a href="http://docdb-xxx.cluster-c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017/?ssl=true&ssl_ca_certs=rds-combined-ca-bundle.pem&replicaSet=rs0">docdb-xxx.cluster-c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017/?ssl=true&ssl_ca_certs=rds-combined-ca-bundle.pem&replicaSet=rs0</a></span></div><div><span style="background:unset;background-blend-mode:unset;border:unset;border-radius:unset;display:unset;float:unset;clear:unset;vertical-align:unset;overflow:unset;isolation:unset;break-after:unset;break-before:unset;break-inside:unset;columns:unset;column-fill:unset;column-rule:unset;opacity:unset;mix-blend-mode:unset;font:unset;writing-mode:unset;text-orientation:unset;border-collapse:unset;empty-cells:unset;caption-side:unset;border-spacing:unset;color:unset;text-transform:unset;text-indent:unset;word-break:unset;text-align-last:unset;text-align:unset;letter-spacing:unset;word-spacing:unset;white-space:pre;line-break:unset;text-combine-upright:unset;list-style:unset;quotes:unset;margin:unset;outline:unset;padding:unset;width:unset;min-width:unset;max-width:unset;height:unset;min-height:unset;max-height:unset;box-sizing:unset;object-fit:unset;object-position:unset;table-layout:unset;text-overflow:unset;text-decoration:unset">instance : </span><span style="background-color:unset;color:unset;font-family:unset;font-size:unset;font-variant-ligatures:unset;font-variant-caps:unset;font-weight:unset;letter-spacing:unset;text-align:unset;text-decoration-line:unset;text-indent:unset;text-transform:unset;white-space:pre;word-spacing:unset">mongodb://master:<insertYourPassword>@<a href="http://docdb-xxx.c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017/?ssl=true&ssl_ca_certs=rds-combined-ca-bundle.pem">docdb-xxx.c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017/?ssl=true&ssl_ca_certs=rds-combined-ca-bundle.pem</a></span></div><div><span style="background:unset;background-blend-mode:unset;border:unset;border-radius:unset;display:unset;float:unset;clear:unset;vertical-align:unset;overflow:unset;isolation:unset;break-after:unset;break-before:unset;break-inside:unset;columns:unset;column-fill:unset;column-rule:unset;opacity:unset;mix-blend-mode:unset;font:unset;writing-mode:unset;text-orientation:unset;border-collapse:unset;empty-cells:unset;caption-side:unset;border-spacing:unset;color:unset;text-transform:unset;text-indent:unset;word-break:unset;text-align-last:unset;text-align:unset;letter-spacing:unset;word-spacing:unset;white-space:pre;line-break:unset;text-combine-upright:unset;list-style:unset;quotes:unset;margin:unset;outline:unset;padding:unset;width:unset;min-width:unset;max-width:unset;height:unset;min-height:unset;max-height:unset;box-sizing:unset;object-fit:unset;object-position:unset;table-layout:unset;text-overflow:unset;text-decoration:unset"><br></span></div><div>In my config I had set this URL for , cachedb_mongodb , db_cachedb and also usrloc . </div><div><br></div><div>modparam("usrloc", "cachedb_url","mongodb://<br><a href="http://master:cluster2018@docdb-xxx.c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017/opensipsDB.userlocation">master:cluster2018@docdb-xxx.c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017/opensipsDB.userlocation</a><br>?ssl=true&ssl_ca_certs=rds-combined-ca-bundle.pem")<br></div><div><br></div><div>Error in the log : </div><div> ERROR:cachedb_mongodb:mongo_con_update: last error: 15.13053: No suitable servers found (`serverSelectionTryOnce` set):<br> [TLS handshake failed: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed calling ismaster on '<a href="http://docdb-xxx.c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017">docdb-xxx.c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017</a>']<br></div><div><br></div><div>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 . </div><div><br></div><div>where I am doing mistake . </div><div><br clear="all"><div><div dir="ltr" class="m_-6962473916224162188gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><b><i>Thanks & Regards</i></b><div><i>Sasmita Panda</i></div><div><i>Senior Network Testing and Software Engineer</i></div><div><i>3CLogic , ph:07827611765</i></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 20, 2019 at 6:02 PM Liviu Chircu <<a href="mailto:liviu@opensips.org" target="_blank">liviu@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <p><tt>It looks like you are connecting to a single node (which is
        SECONDARY), rather than a replica set,<br>
        so the driver is unable to locate a PRIMARY node, to which it
        can issue writes.<br>
      </tt></p>
    <p><tt>What does your DocumentDB infrastructure look like?  Is it a
        replica set?  A single instance?</tt><br>
    </p>
    <pre class="gmail-m_-6962473916224162188gmail-m_-2261314629758844566moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="gmail-m_-6962473916224162188gmail-m_-2261314629758844566moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
    <div class="gmail-m_-6962473916224162188gmail-m_-2261314629758844566moz-cite-prefix">On 16.09.2019 10:35, Sasmita Panda
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">The new core file is given below in pastebin 
        <div><br>
          <div><a href="https://pastebin.com/zMpf12MQ" target="_blank">https://pastebin.com/zMpf12MQ</a>  </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>Rather than this , I was trying to upgrade mongo c
            library to 1.9 and running with document DB . </div>
          <div><br>
          </div>
          <div>Here I am not able to connect to Document DB . its giving
            below error </div>
          <div>When I am connecting with SSL=true </div>
          <div><font color="#ff0000"> 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 '<a href="http://docdb-2019-09-14-06-14-132.c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017" target="_blank">docdb-2019-09-14-06-14-132.c8aqanvkjwjr.us-east-1.docdb.amazonaws.com:27017</a>']</font><br>
          </div>
          <div><br>
          </div>
          <div>When I am doing without ssl </div>
          <div><font color="#ff0000">ERROR:cachedb_mongodb:mongo_con_update:
              last error: 1.11: Authentication failed.</font><br>
          </div>
          <div><br>
          </div>
          <div>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 . </div>
          <div><br>
          </div>
          <div>Below is the library version in my instance . and
            Document db is in same 3.6 version . </div>
          <div>dpkg -l | grep -i libmongoc<br>
            ii  libmongoc-1.0-0                      1.9.2+dfsg-1build1
                            amd64        MongoDB C client library -
            runtime files<br>
            ii  libmongoc-dev                        1.9.2+dfsg-1build1
                            amd64        MongoDB C client library - dev
            files<br>
          </div>
          <div><br>
          </div>
          <div><br clear="all">
            <div>
              <div dir="ltr" class="gmail-m_-6962473916224162188gmail-m_-2261314629758844566gmail_signature">
                <div dir="ltr">
                  <div>
                    <div dir="ltr"><b><i>Thanks & Regards</i></b>
                      <div><i>Sasmita Panda</i></div>
                      <div><i>Senior Network Testing and Software
                          Engineer</i></div>
                      <div><i>3CLogic , ph:07827611765</i></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <br>
          </div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Thu, Sep 12, 2019 at 7:50
          PM Liviu Chircu <<a href="mailto:liviu@opensips.org" target="_blank">liviu@opensips.org</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div bgcolor="#FFFFFF">
            <p><tt>Let's follow the official build guide [1], maybe it
                will make things easier.<br>
              </tt></p>
            <p><tt>So make sure to install below requirements, then try
                again:</tt><br>
            </p>
            <pre style="overflow:auto hidden;background-color:rgb(245,245,245);border:1px solid rgb(198,201,203);color:rgb(34,34,34);font-size:0.75em;line-height:1.5em;margin:1.5em 0px;padding:10px;font-family:Consolas,Menlo,"Deja Vu Sans Mono","Bitstream Vera Sans Mono",monospace;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">sudo apt install cmake libssl-dev libsasl2-dev</pre>
            <p><tt>[1]: </tt><tt><a href="http://mongoc.org/libmongoc/current/installing.html" target="_blank">http://mongoc.org/libmongoc/current/installing.html</a></tt></p>
            <pre class="gmail-m_-6962473916224162188gmail-m_-2261314629758844566gmail-m_6319366684754466163moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="gmail-m_-6962473916224162188gmail-m_-2261314629758844566gmail-m_6319366684754466163moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
            <div class="gmail-m_-6962473916224162188gmail-m_-2261314629758844566gmail-m_6319366684754466163moz-cite-prefix">On
              12.09.2019 14:37, Sasmita Panda wrote:<br>
            </div>
            <blockquote type="cite">make[1]: Entering directory
              '/opt/mongo-c-driver'<br>
                CCLD     test-replica-set<br>
              /usr/bin/ld: tests/test_replica_set-ha-test.o: undefined
              reference to symbol '<a class="gmail-m_-6962473916224162188gmail-m_-2261314629758844566gmail-m_6319366684754466163moz-txt-link-abbreviated" href="mailto:pthread_once@@GLIBC_2.2.5" target="_blank">pthread_once@@GLIBC_2.2.5</a>'<br>
              //lib/x86_64-linux-gnu/libpthread.so.0: error adding
              symbols: DSO missing from command line</blockquote>
          </div>
          _______________________________________________<br>
          Users mailing list<br>
          <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
          <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="gmail-m_-6962473916224162188gmail-m_-2261314629758844566mimeAttachmentHeader"></fieldset>
      <pre class="gmail-m_-6962473916224162188gmail-m_-2261314629758844566moz-quote-pre">_______________________________________________
Users mailing list
<a class="gmail-m_-6962473916224162188gmail-m_-2261314629758844566moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="gmail-m_-6962473916224162188gmail-m_-2261314629758844566moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </div>

_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>