<div dir="ltr"><div>Hi,<br></div><div><br></div><div>I'm am still getting these database related messages on my opensips servers.</div><div><br></div><div>/usr/local/sbin/opensips[29086]: INFO:db_mysql:switch_state_to_disconnected: disconnect event for 0x7fb482d108a8<br>/usr/local/sbin/opensips[29086]: INFO:db_mysql:reset_all_statements: resetting all statements on connection: (0x7fb482d11080) 0x7fb482d108a8<br>/usr/local/sbin/opensips[29086]: INFO:db_mysql:connect_with_retry: re-connected successful for 0x7fb482d108a8<br></div><div><br></div><div>As per my last post on this subject, the database it is using is local to opensips - i.e. running on the same machine opensips. Thus, there should be no networking or routing or firewall that could be causing connectivity issues.</div><div><br></div><div>Why is opensips generating such logs suggesting that it cannot connect to its local database? What could be causing this issue - opensips or the (MariaDB) database?</div><div><br></div><div>Thank you. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 23 Dec 2019 at 14:49, solarmon <<a href="mailto:solarmon@one-n.co.uk">solarmon@one-n.co.uk</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 dir="ltr"><div dir="ltr">Hi,<br><div><br></div><div>Looking at the logs, these "INFO:db_mysql:switch_state_to_disconnected" events do occur quite regularly.</div><div><br></div><div>Also note that the database is local to the opensips node (part of a two node cluster, with mariadb master/master syncing)).</div><div><br></div><div>As per another post (that has not has a response) I'm using the
"opensipsctl dispatcher show" to monitor the endpoint status. I think this is related as I've notice that the state shown by "
"opensipsctl dispatcher show"" and
"opensipsctl dispatcher dump" differ:</div><div><br></div><div>When using "opensipsctl dispatcher show":<br><br>+----+-------+------------------------+-----------------------+-------+--------+----------+-------+--------------+<br>| id | setid | destination | socket | state | weight | priority | attrs | description |<br>+----+-------+------------------------+-----------------------+-------+--------+----------+-------+--------------+<br>| 1 | 1 | sip:A.B.C.D:5060 | udp:W.X.Y.Z:5060 | 2 | 1 | 0 | | |<br><br>When using "opensipsctl dispatcher dump":<br><br> SET:: 1<br> URI:: sip:A.B.C.D:5060 state=Active first_hit_counter=0<br> socket:: udp:W.X.Y.Z:5060<br></div></div><div><br></div><div>I might change my monitoring script to use
"opensipsctl dispatcher dump", but it was easier for me to process the tabular format as it contains the destination and state in the same line.</div><div><br></div><div>Thanks.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 23 Dec 2019 at 14:37, Răzvan Crainea <<a href="mailto:razvan@opensips.org" target="_blank">razvan@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">There are no errors - as the level indicates, there are some INFO <br>
messages indicating that a re-connection is done. Most likely the <br>
database connection was in a stale state, and the driver decided to <br>
reconnect. Nothing wrong about that.<br>
<br>
The reason for switching the endpoint in probing mode comes from the SIP <br>
signaling level - you should add more debugging in your script to <br>
understand this problem, or take a look at the signaling level.<br>
<br>
Best regards,<br>
<br>
Răzvan Crainea<br>
OpenSIPS Core Developer<br>
<a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">http://www.opensips-solutions.com</a><br>
<br>
On 12/23/19 11:38 AM, solarmon wrote:<br>
> Hi,<br>
> <br>
> I'm investigating why there was a blip in the Dispatcher endpoint SIP <br>
> Options pings. The endpoint went in to "State=2 (Probing)" state and at <br>
> the same time the following was logged in opensips.log:<br>
> <br>
> /usr/local/sbin/opensips[29087]: <br>
> INFO:db_mysql:switch_state_to_disconnected: disconnect event for <br>
> 0x7fb482d108a8<br>
> /usr/local/sbin/opensips[29087]: INFO:db_mysql:reset_all_statements: <br>
> resetting all statements on connection: (0x7fb482d11080) 0x7fb482d108a8<br>
> /usr/local/sbin/opensips[29087]: INFO:db_mysql:connect_with_retry: <br>
> re-connected successful for 0x7fb482d108a8<br>
> /usr/local/sbin/opensips[29077]: <br>
> INFO:db_mysql:switch_state_to_disconnected: disconnect event for <br>
> 0x7fb482d108a8<br>
> /usr/local/sbin/opensips[29077]: INFO:db_mysql:reset_all_statements: <br>
> resetting all statements on connection: (0x7fb482d11080) 0x7fb482d108a8<br>
> /usr/local/sbin/opensips[29077]: INFO:db_mysql:connect_with_retry: <br>
> re-connected successful for 0x7fb482d108a8<br>
> <br>
> Please can somebody advise what these error messages mean and how/what <br>
> to investigate it further and resolve it.<br>
> <br>
> Thank you.<br>
> <br>
> _______________________________________________<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>
> <br>
<br>
_______________________________________________<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></div>
</blockquote></div>