[asterisk-bugs] [JIRA] (ASTERISK-28566) CDR backend unload problem during active call(s)

Asterisk Team (JIRA) noreply at issues.asterisk.org
Fri Oct 4 15:22:49 CDT 2019


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=248242#comment-248242 ] 

Asterisk Team commented on ASTERISK-28566:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

> CDR backend unload problem during active call(s)
> ------------------------------------------------
>
>                 Key: ASTERISK-28566
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28566
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: CDR/General
>    Affects Versions: 16.5.1
>         Environment: Debian Wheeze 64bit, Asterisk compiled from source.
>            Reporter: Marian Piater
>
> When I have upgraded from version 11.25.3 to 16.5.1 our PBX crashed during next five days. I found, that problem starts when our cron unload and load cdr_mysql.so module. I have to unload/load this module, because our pbx using special national characters and sometimes happen after few days, that cdr_mysql stored text not in utf8. But when I unloaded/loaded module every day, than connection in utf8 worked. That was problem in 11.25.3 and now I now, that I can use module reload. 
> But back to the problem, because it is maybe related to the other cdr backend such as odbc, psql etc...
> When I try to unload cdr_mysql.so module during active call(s) then I see this message from cdr.c
> {code}
> [Oct  4 20:36:48] WARNING[99120]: cdr.c:2974 ast_cdr_generic_unregister: Unable to unregister CDR backend mysql; 5 CDRs are still active
> [Oct  4 20:36:48] WARNING[99120]: loader.c:1264 ast_unload_resource: Firm unload failed for cdr_mysql.so
> {code}
> Module was not unregistered, but the command "cdr mysql status" disappear from CLI. 
> MySQL backend is still registered as I can see in cdr show status:
> {code}
> Call Detail Record (CDR) settings
> ----------------------------------
>   Logging:                    Enabled
>   Mode:                       Simple
>   Log unanswered calls:       Yes
>   Log congestion:             No
> * Registered Backends
>   -------------------
>     mysql
> {code}
> After disconnect active calls, I see this error:
> {code}
> [Oct  4 20:36:55] ERROR[98837]: cdr_mysql.c:212 mysql_log: Cannot connect to database server >�: (2005) Unknown MySQL server host '>�' (-5)
> [Oct  4 20:37:00] ERROR[98837]: cdr_mysql.c:212 mysql_log: Cannot connect to database server >�: (2005) Unknown MySQL server host '>�' (-5)
> {code}
> Or during last test (same server, same configuration):
> {code}
> [Oct  4 21:53:58] ERROR[123001]: cdr_mysql.c:212 mysql_log: Cannot connect to database server r show s: (2005) Unknown MySQL server host 'r show s' (-5)
> [Oct  4 21:53:59] ERROR[123001]: cdr_mysql.c:212 mysql_log: Cannot connect to database server r show s: (2005) Unknown MySQL server host 'r show s' (-5)
> [Oct  4 21:54:00] ERROR[123001]: cdr_mysql.c:212 mysql_log: Cannot connect to database server r show s: (2005) Unknown MySQL server host 'r show s' (-5)
> {code}
> Server host is a localhost, but in a console I see "r show s" or other strange text from dialplan or CLI command (cdr show status   = r show s)
> In this case, values from dialplan:
> {code}
> [Oct  4 06:53:18] ERROR[25236] cdr_mysql.c: Cannot connect to database server XTENSION: (2005) Unknown MySQL server host 'XTENSION' (-2)
> [Oct  4 06:57:41] ERROR[25236] cdr_mysql.c: Cannot connect to database server XTENSION: (2005) Unknown MySQL server host 'XTENSION' (-2)
> {code}
> I also tried connect to mysql using socket:
> {code}
> [Oct  4 07:47:48] ERROR[25236] cdr_mysql.c: Cannot connect to database server : (2002) Can't connect to local MySQL server through socket 'ng_calls' (2 "No such file or directory")
> [Oct  4 07:49:12] ERROR[25236] cdr_mysql.c: Cannot connect to database server : (2002) Can't connect to local MySQL server through socket 'ng_calls' (2 "No such file or directory")
> [Oct  4 07:49:54] ERROR[25236] cdr_mysql.c: Cannot connect to database server : (2002) Can't connect to local MySQL server through socket 'ng_calls' (2 "No such file or directory")
> {code}
> Since this errors, CDRs are not stored in database and few calls later (maybe 50 calls), asterisk have an other issue when dialplan execution stops, during set value to CDR variables:
> For example:
> {code}
> [Oct  4 08:40:59] VERBOSE[17778][C-00002325] pbx.c: Executing [0728733844 at in_extensions_72:2] Set("SIP/6196-0000430f", "CDR(call_id)=1570171260790723829-0 at 192.168.222.243") in new stack
> {code}
> That was the last executed application in a dialplan.
> The issue replication is simple. Just try to unload cdr_mysql.so (or maybe also other cdr sql backends) during at least one active call. 
> Thank you.
> Best regards
> Marian



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list