CDR report and MySQL Issue

Status
Not open for further replies.

daniel.821

Joined
Jun 8, 2011
Messages
21
Reaction score
0
Hi all,

We are running an Elastix 1.6-13 server, and recently we have implemented a security threat update, which shown at below:

http://www.xorcom.com/alerts/elastix-se ... ution.html

Ever since then, the CDR report has stopped displaying on the web gui. However, if you go down to /var/log/asterisk/cdr-csv/Master.csv you can still find the up-today report. So I guess that means, CDR report is still generating properly. When we do troubleshoot on our server:

Asterisk*CLI> cdr status
CDR logging: enabled
CDR mode: simple
CDR output unanswered calls: no
CDR registered backend: cdr-custom
CDR registered backend: mysql
CDR registered backend: csv
CDR registered backend: cdr_manager

Asterisk*CLI> cdr mysql status
Not currently connected to a MySQL server.

Hence we suspect its the update change the passwords somewhere, and caused MySQL server not linked properly. We were wondering if anyone knows what files/passwords I need to check or even in the MySQL server, how am I able to make it reconnect?

Thank you guys so much in advance.
 
That is correct... That issue was caused by the fact of changing the password on asteriskuser, to fix it, you will need to change the password for asterisk user on the following files:
grep -r "asteriskuser" /etc/asterisk/*
grep -r "asteriskuser" /var/www/html/modules/*
Those two commands will show up some files, you will need to edit them, and use the new password that you have set for asteriskuser

Then execute from console:
asterisk -rx "module reload"
 
Dear jgutierrez,

Thank you very much for your reply. I have followed your steps and edited the following files:

[root@elastix ~]# grep -r "asteriskuser" /etc/asterisk/*
/etc/asterisk/cbmysql.conf:password=eLaStIx.asteriskuser.2oo7
/etc/asterisk/cbmysql.conf:user=asteriskuser
/etc/asterisk/cdr_mysql.conf:password = eLaStIx.asteriskuser.2oo7
/etc/asterisk/cdr_mysql.conf:user = asteriskuser
/etc/asterisk/cdr_mysql.conf.bak:password = eLaStIx.asteriskuser.2oo7
/etc/asterisk/cdr_mysql.conf.bak:user = asteriskuser
/etc/asterisk/res_mysql.conf:dbuser = asteriskuser
/etc/asterisk/res_mysql.conf:dbpass = eLaStIx.asteriskuser.2oo7


[root@elastix ~]# grep -r "asteriskuser" /var/www/html/modules/*
/var/www/html/modules/conference/libs/schema.meetme:GRANT SELECT, UPDATE, INSERT, DELETE ON `meetme`.* to asteriskuser@localhost
/var/www/html/modules/conference/libs/schema.meetme:IDENTIFIED BY 'eLaStIx.asteriskuser.2oo7';
/var/www/html/modules/graphic_report/libs/grafic_queue.php:$dsnAsteriskCdr = "mysql://asteriskuser:eLaStIx.asteriskuser.2oo7@localhost/asteriskcdrdb";
/var/www/html/modules/graphic_report/libs/grafic_queue.php:$dsnAsteriskDev = "mysql://asteriskuser:eLaStIx.asteriskuser.2oo7@localhost/asterisk";
/var/www/html/modules/graphic_report/libs/grafic_trunk.php:$dsnAsteriskCdr = "mysql://asteriskuser:eLaStIx.asteriskuser.2oo7@localhost/asteriskcdrdb";
/var/www/html/modules/graphic_report/libs/grafic_trunk2.php:$dsnAsteriskCdr = "mysql://asteriskuser:eLaStIx.asteriskuser.2oo7@localhost/asteriskcdrdb";
/var/www/html/modules/summary_by_extension/configs/default.conf.php: $arrConfModule['dsn_conn_database'] = 'mysql://asteriskuser:eLaStIx.asteriskuser.2oo7@localhost/asteriskcdrdb';


However, our CDR report is still not working. I suspect during the previous troubleshooting our engineer may have made some changes to the MySQL server. Can you please be so kind to give some more advises to troublshoot MySQL database?

Once again, thank you very much for your support.

Daniel
 
Sure, change again the mysql password for asteriskuser, edit it on /etc/amportal.conf, then on the other files, if you do that, everything should work correctly...
I have followed that prcedure a few times, and it has worked correctly
 
Dear jgutierrez,

Thank you for your reply.

We have implemented the new update:
http://www.xorcom.com/index.php?option= ... Itemid=488

After running ampasswd, i get this error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y ES)

Is it because the root password in mysql has been changed?

Thank you very much again for your help.

Dan
 
I'm not sure what does that RPM from xorcom, but the message states that you are trying to connect as root user to mysql, but the password is incorrect
 
Status
Not open for further replies.

Forum statistics

Threads
111,864
Messages
589,450
Members
164,702
Latest member
iamatlas