<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><tt>Hi Denis,</tt></p>
    <p><tt>Looking through the logs, this one seems to be relevant, and
        we need to understand the root cause for why it's happening:<br>
      </tt></p>
    <pre wrap="">Aug 19 17:00:37 opensips-main /usr/local/opensips2.1/sbin/opensips[17749]: WARNING:drouting:dr_load_routing_info: table "ast_dr_rules" is empty

As far as I can understand, one "dr_reload" command finds the table empty, then the next one properly retrieves the data! Although I see several disconnect events in there (for each process!), the driver should have reported "too many reconnects" errors if those were really the cause.

Could you provide more info about your MySQL setup? Is it a server, slave or cluster? What software and what version?
</pre>
    <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 09.09.2016 09:19, Denis wrote:<br>
    </div>
    <blockquote cite="mid:1665303029.20160909091943@ptl.ru" type="cite">
      <title>Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty</title>
      <span style=" font-family:'Times New Roman'; font-size: 12pt;">Hello!<br>
        <br>
        Any ideas about the problem?<br>
        <br>
      </span><a moz-do-not-send="true" style=" font-family:'arial';
        font-size: 10pt;" href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a><br>
      <br>
      <table>
        <tbody>
          <tr>
            <td bgcolor="#0000ff" width="2"><br>
            </td>
            <td>
              <table>
                <tbody>
                  <tr>
                    <td bgcolor="#0000ff" width="2"><br>
                    </td>
                    <td><span style=" font-family:'times new roman';
                        font-size: 12pt;">Hello, Bogdan<br>
                        <br>
                        I am sorry that i did not describe the problem
                        more clearly.<br>
                        404 opensips sends because in opensips.cfg i
                        wrote a logic that if in dr_rules opensips finds
                        no rules for routing it must send 404.<br>
                        And the problem i think is there. Opensips began
                        rejects all calls with 404, i.e. it could not
                        find any rules in dr_rules table.<br>
                        Everthing began fine after fifo dr_reload
                        command execution, i.e. after dr_rules updating.
                          <br>
                        <br>
                        <span style=" font-family:'arial'; font-size:
                          10pt;"><i>-- <br>
                          </i></span></span><a moz-do-not-send="true"
                        style=" font-family:'arial'; font-size: 10pt;"
                        href="mailto:d.putyato@ptl.ru">mailto:denis7979@mail.ru</a><br>
                      <br>
                      <table bgcolor="#ffffff">
                        <tbody>
                          <tr>
                            <td bgcolor="#0000ff" width="2"><br>
                            </td>
                            <td><span style=" font-family:'courier new';
                                font-size: 12pt;">Hi,<br>
                                <br>
                                OpenSIPS by itself does not send any
                                404. If it does, it does it because you
                                put that into the script. So, you have
                                to look into your script and see the
                                logical path that makes OpenSIPS to get
                                to sending a 404 reply.<br>
                                <br>
                                You may use the script_trace :<br>
                                 </span><a moz-do-not-send="true"
                                style=" font-family:'courier new';
                                font-size: 12pt;"
href="http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc43">http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc43</a><br>
                              <br>
                              <span style=" font-family:'courier new';
                                font-size: 12pt;">Regards,<br>
                                Bogdan-Andrei Iancu<br>
                                OpenSIPS Founder and Developer<br>
                              </span><a moz-do-not-send="true" style="
                                font-family:'courier new'; font-size:
                                12pt;"
                                href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><br>
                              <span style=" font-family:'times new
                                roman'; font-size: 12pt;">On 30.08.2016
                                22:26, Denis wrote:<br>
                              </span>
                              <table>
                                <tbody>
                                  <tr>
                                    <td bgcolor="#3200ff" width="2"><br>
                                    </td>
                                    <td><span style=" font-family:'times
                                        new roman'; font-size: 12pt;">Re:
                                        Opensips 2.2.1 dr_rules is empty
                                        Hello!<br>
                                        <br>
                                        Some time ago i wrote about a
                                        problem when Opensips began
                                        reject all calls with 404 code.<br>
                                        Unfortunately i did not received
                                        any answer.<br>
                                        Since that time i have made
                                        upgrade from 2.1.2 to 2.2.1 and
                                        today i have got the same
                                        problem. Opensips began rejects
                                        all calls with 404 code. <br>
                                        <br>
                                        Based on the information from
                                        log, i make suggest that problem
                                        began when dr_reload command has
                                        been received. <br>
                                        And the problem has been solved,
                                        again, when the dr_reload
                                        command has been received (the
                                        period about two commands is
                                        about a couple of minutes).<br>
                                        <br>
                                        I please help to solve the
                                        problem. <br>
                                        <br>
                                        Thank you.<br>
                                        <br>
                                      </span><a moz-do-not-send="true"
                                        style=" font-family:'arial';
                                        font-size: 10pt;"
                                        href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a><br>
                                      <br>
                                      <table>
                                        <tbody>
                                          <tr>
                                            <td bgcolor="#0000ff"
                                              width="2"><br>
                                            </td>
                                            <td><span style="
                                                font-family:'times new
                                                roman'; font-size:
                                                12pt;">Hello!<br>
                                                <br>
                                                Recently i begun to get
                                                such problem.<br>
                                                Opensips rejects all
                                                calls with 404 code. I
                                                can solve the problem by
                                                making dr_reload.<br>
                                                I tried to analyze a log
                                                and what i could found
                                                you can see in
                                                attachment.<br>
                                                As i could understand
                                                last problem began after
                                                dr_reload.<br>
                                                <br>
                                                Thank you for any help.<br>
                                                <br>
                                                <br>
                                              </span><a
                                                moz-do-not-send="true"
                                                style="
                                                font-family:'arial';
                                                font-size: 10pt;"
                                                href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a></td>
                                          </tr>
                                        </tbody>
                                      </table>
                                      <br>
                                      <br>
                                      <br>
                                      <br>
                                      <br>
                                      <span style=" font-family:'courier
                                        new'; font-size: 12pt;">_______________________________________________<br>
                                        Users mailing list<br>
                                      </span><a moz-do-not-send="true"
                                        style=" font-family:'courier
                                        new'; font-size: 12pt;"
                                        href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
                                      <a moz-do-not-send="true" style="
                                        font-family:'courier new';
                                        font-size: 12pt;"
                                        href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></td>
                                  </tr>
                                </tbody>
                              </table>
                            </td>
                          </tr>
                        </tbody>
                      </table>
                    </td>
                  </tr>
                </tbody>
              </table>
            </td>
          </tr>
        </tbody>
      </table>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>