[asterisk-users] Error writing CDR

Ethy H. Brito ethy.brito at inexo.com.br
Sat Apr 25 09:51:57 CDT 2015


Hi All

I have dozens of these messages on CLI complaining about database connection and error writing CDR to disk.

The curious thing is I can find them all inside the database.
I "selected" them using uniqueid and manually compared each column with the cdr_adaptive_odbc.c error line.

"mysqlcheck -a -e -v DBase"  and "mysqlcheck -c -e -v DBase" both returned OK for all tables.

Environment is:
	in production Asterisk 11.7.0~dfsg-1ubuntu1
	Ubuntu 14.04.1 LTS

Any thoughts?

Thanx

Ethy

[Apr 25 10:56:56] WARNING[19013][C-000002cb]: res_odbc.c:645
ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 23000:
[MySQL][ODBC 5.1 Driver][mysqld-5.5.40-0ubuntu0.14.04.1-log]Duplicate entry
'0000-00-00 00:00:00-1234-CLIENT_ID' for key 'PRIMARY' (133) 

[Apr 25 10:56:56] WARNING[19013][C-000002cb]: res_odbc.c:657
ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to
MyAsterisk-asterisk [MyAsterisk-asterisk]... 

[Apr 25 10:56:56] WARNING[19013][C-000002cb]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect... 

[Apr 25 10:57:01] NOTICE[19013][C-000002cb]: res_odbc.c:1527 odbc_obj_connect: Connecting MyAsterisk-asterisk 

[Apr 25 10:57:01] NOTICE[19013][C-000002cb]: res_odbc.c:1559
odbc_obj_connect: res_odbc: Connected to MyAsterisk-asterisk [MyAsterisk-asterisk]

[Apr 25 10:57:01] WARNING[19013][C-000002cb]: res_odbc.c:645
ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 23000:
[MySQL][ODBC 5.1 Driver][mysqld-5.5.40-0ubuntu0.14.04.1-log]Duplicate entry
'0000-00-00 00:00:00-1234-CLIENT_ID' for key 'PRIMARY' (133) 

[Apr 25 10:57:01] WARNING[19013][C-000002cb]: res_odbc.c:657
ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to
MyAsterisk-asterisk [MyAsterisk-asterisk]... 

[Apr 25 10:57:01]
WARNING[19013][C-000002cb]: res_odbc.c:761 ast_odbc_sanity_check: Connection is
down attempting to reconnect... 

[Apr 25 10:57:02]
WARNING[7666]: chan_sip.c:4409 __sip_autodestruct: Autodestruct on dialog
'34f3f3481b8d1e4772dc111f42d13bd1 at ip.ip.ip.ip:5060' with owner
SIP/CLIENT_ID_1-00000178 in place (Method: BYE). Rescheduling destruction
for 10000 ms 

[Apr 25 10:57:06] NOTICE[19013][C-000002cb]: res_odbc.c:1527
odbc_obj_connect: Connecting MyAsterisk-asterisk 

[Apr 25 10:57:06]
NOTICE[19013][C-000002cb]: res_odbc.c:1559 odbc_obj_connect: res_odbc:
Connected to MyAsterisk-asterisk [MyAsterisk-asterisk] 

[Apr 25 10:57:06]
WARNING[19013][C-000002cb]: cdr_adaptive_odbc.c:739 odbc_log:
cdr_adaptive_odbc: Insert failed on 'MyAsterisk-asterisk:cdr'.  CDR failed: INSERT
INTO cdr
(dst,accountcode,clid,src,dcontext,channel,dstchannel,lastapp,duration,billsec,disposition,amaflags,userfield,lastdata,uniqueid)
VALUES (blahblahblah, ... ,'1429970147.612')



More information about the asterisk-users mailing list