<html><head><title>Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty</title>
</head>
<body>
<span style=" font-family:'Times New Roman'; font-size: 12pt;">Hello, Liviu!<br>
<br>
The problem is still active.<br>
In attachment you can see the latest log of the problem.<br>
<br>
After the last string mysql connection became correct.<br>
<br>
I want to ask, does it make any sense to increase timer parameters for mysql connection.<br>
Ok, suppose we have some problem with the server and increasing of timer parameters will help for it, but why does dr_rules becomes empty if it has mysql connection problem?<br>
<br>
<br>
</span><a style=" font-family:'arial'; font-size: 10pt;" href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a><br>
<br>
<table bgcolor="#ffffff">
<tr>
<td width=2 bgcolor= #0000ff><br>
</td>
<td><span style=" font-family:'courier new'; font-size: 12pt;">Correct, Denis - they have nothing to do with each other. I am just trying to isolate our problem (by excluding "too many reconnects"), so we can better understand what's happening.<br>
Liviu Chircu<br>
OpenSIPS Developer<br>
</span><a 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 12.09.2016 15:45, Denis wrote:<br>
</span><table>
<tr>
<td width=2 bgcolor= #3200ff><br>
</td>
<td><span style=" font-family:'times new roman'; font-size: 12pt;">Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Liviu, and one interesting thing.<br>
if we have some problem with mysql connection, why does dr_rules becomes "empty"?<br>
<br>
</span><a style=" font-family:'arial'; font-size: 10pt;" href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a><br>
<br>
<table bgcolor="#ffffff">
<tr>
<td width=2 bgcolor= #0000ff><br>
</td>
<td><span style=" font-family:'courier new'; font-size: 12pt;">Since you are using OpenSIPS 2.2, you can tune the following modparams of "db_mysql" [1], and see if behavior improves:<br>
- max_db_queries (how many times a query is attempted)<br>
- max_db_retries (for each query attempt above ^, how many attempts to connect to the MySQL server)<br>
<br>
[1]: </span><a style=" font-family:'courier new'; font-size: 12pt;" href="http://www.opensips.org/html/docs/modules/2.2.x/db_mysql.html#id249634">http://www.opensips.org/html/docs/modules/2.2.x/db_mysql.html#id249634</a><br>
<span style=" font-family:'courier new'; font-size: 12pt;">Liviu Chircu<br>
OpenSIPS Developer<br>
</span><a 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 12.09.2016 13:02, Denis wrote:<br>
</span><table>
<tr>
<td width=2 bgcolor= #3200ff><br>
</td>
<td><span style=" font-family:'times new roman'; font-size: 12pt;">Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Hello,. Liviu!<br>
<br>
I saw in log "<span style=" font-family:'courier new';">too many reconnects<span style=" font-family:'times new roman';">". Unfortunately it does not reflected in log files that i attached early but it was there.<br>
So.<br>
I have two servers with two mysql + Opensips installation. As you probably gassed one server is active and another is stand by. <br>
Active server has "Server version: 5.5.50-0ubuntu0.12.04.1-log (Ubuntu)" mysql installation and standby server has "Server version: 5.5.44-0ubuntu0.14.04.1-log (Ubuntu)" mysql installation.<br>
Respectively active server has "Ubuntu 12.04.5 LTS precise" and standby has "Ubuntu 14.04.3 LTS trusty"<br>
Mysql replication master-master has been customized between two servers.<br>
<br>
</span></span></span><a style=" font-family:'arial'; font-size: 10pt;" href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a><br>
<br>
<table bgcolor="#ffffff">
<tr>
<td width=2 bgcolor= #0000ff><br>
</td>
<td><span style=" font-family:'courier new'; font-size: 12pt;">Hi Denis,<br>
Looking through the logs, this one seems to be relevant, and we need to understand the root cause for why it's happening:<br>
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<br>
<br>
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.<br>
<br>
Could you provide more info about your MySQL setup? Is it a server, slave or cluster? What software and what version?<br>
Liviu Chircu<br>
OpenSIPS Developer<br>
</span><a 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 09.09.2016 09:19, Denis wrote:<br>
</span><table>
<tr>
<td width=2 bgcolor= #3200ff><br>
</td>
<td><span style=" font-family:'times new roman'; font-size: 12pt;">Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty Hello!<br>
<br>
Any ideas about the problem?<br>
<br>
</span><a style=" font-family:'arial'; font-size: 10pt;" href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a><br>
<br>
<table>
<tr>
<td width=2 bgcolor= #0000ff><br>
</td>
<td><table>
<tr>
<td width=2 bgcolor= #0000ff><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 style=" font-family:'arial'; font-size: 10pt;" href="mailto:d.putyato@ptl.ru">mailto:denis7979@mail.ru</a><br>
<br>
<table bgcolor="#ffffff">
<tr>
<td width=2 bgcolor= #0000ff><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 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 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>
<tr>
<td width=2 bgcolor= #3200ff><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 style=" font-family:'arial'; font-size: 10pt;" href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a><br>
<br>
<table>
<tr>
<td width=2 bgcolor= #0000ff><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 style=" font-family:'arial'; font-size: 10pt;" href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a></td>
</tr>
</table>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<span style=" font-family:'courier new'; font-size: 12pt;">_______________________________________________<br>
Users mailing list<br>
</span><a style=" font-family:'courier new'; font-size: 12pt;" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a 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>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<br>
<br>
<br>
<span style=" font-family:'courier new'; font-size: 12pt;">_______________________________________________<br>
Users mailing list<br>
</span><a style=" font-family:'courier new'; font-size: 12pt;" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a 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>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body></html>