[asterisk-bugs] [JIRA] (ASTERISK-28956) res_odbc: ODBC connection does not always reconnect
Kevin Harwell (JIRA)
noreply at issues.asterisk.org
Mon Jun 22 11:58:25 CDT 2020
[ https://issues.asterisk.org/jira/browse/ASTERISK-28956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=251192#comment-251192 ]
Kevin Harwell commented on ASTERISK-28956:
------------------------------------------
In Asterisk you could try to enable debugging level 3 on the relevant modules to see if it turns anything up. Please post the logs after an occurrence:
{noformat}
*CLI> core set debug 3 res_odbc.so
{noformat}
{noformat}
core set debug 3 cdr
{noformat}
I'd also suggest you enable tracing logging in ODBC itself. Note, however this could potentially create large log files. You should be able to do this by modifying your [odbcinst.ini file|http://www.unixodbc.org/odbcinst.html]. For example:
{quote}
[MySQL-test]
Trace = Yes
TraceFile = sql.log
{quote}
> res_odbc: ODBC connection does not always reconnect
> ---------------------------------------------------
>
> Key: ASTERISK-28956
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-28956
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: CDR/cdr_adaptive_odbc
> Affects Versions: 16.8.0
> Environment: CentOS 7 x64
> Reporter: Luke Escude
>
> So I am not too sure how to diagnose this one, but I've seen it happen too many times to not report it.
> Environment: Our Asterisk instances use an ODBC connection for CDR (adaptive_odbc) as well as an ODBC connection for Voicemail. The DSNs for each of these is separate, since they point to separate MySQL servers.
> Failure Scenario: A SQL server goes down for some X minutes. During those X minutes, all Asterisk instances that are supposed to connect to that particular one are aware of the issue, and odbc show will indicate as such. This is expected behavior, and happens for both the Voicemail ODBC and the CDR ODBC connection.
> Recovery Scenario: When a Voicemail SQL server comes back up, ALL Asterisk instances see it and reconnect. This is expected. However, when the CDR SQL server comes back up, only a majority of Asterisk instances reconnect. The remaining ones will say 1 out of 1 (meaning ODBC is connected) but will not log CDR at all until performing a module reload res_adaptive_odbc command. Some of them will still say 0 out of 1, indicating the connection is indeed dead, but they never attempt to reconnect.
> While the issue is happening, are there any other useful commands I can run to assist it diagnosing this? I don't want to have to restart asterisk since obviously that will fix it.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list