[asterisk-bugs] [JIRA] (ASTERISK-28566) CDR backend unload problem during active call(s)
Friendly Automation (JIRA)
noreply at issues.asterisk.org
Tue Oct 8 07:30:48 CDT 2019
[ https://issues.asterisk.org/jira/browse/ASTERISK-28566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Friendly Automation closed ASTERISK-28566.
------------------------------------------
Resolution: Fixed
> 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
> Assignee: Unassigned
> Labels: patch
> Attachments: 0001-cdr_mysql-Don-t-clean-up-on-unload-unless-we-can-unr.patch
>
>
> 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