[asterisk-users] realtime queue_log to mySQL backport to 1.4

Lee, John (Sydney) John.Lee at compuware.com
Thu Oct 16 02:52:41 CDT 2008


> Also i would suggest enabling full log, as it's one place you can see
> everything. Then use grep to search for realtime messages. Your
> logger.conf should already have commented line:
> 
> full => notice,warning,error,debug,verbose
>
Yes, I did that.

> # tail -fn0 /var/log/asterisk/full | grep -F "res_config_mysql"
> to see every message about realtime driver.
>
Still, I did not get any hit on res_config_mysql when I do an
AddQueueMember or RemoveQueueMember.
When I restarted Asterisk, I saw:
[Oct 16 ...] DEBUG[24880] res_config_mysql.c: MySQL RealTime Host:
localhost
[Oct 16 ...] DEBUG[24880] res_config_mysql.c: MySQL RealTime Port: 3306
[Oct 16 ...] DEBUG[24880] res_config_mysql.c: MySQL RealTime User: uid
[Oct 16 ...] DEBUG[24880] res_config_mysql.c: MySQL RealTime Password:
pwd
[Oct 16 ...] DEBUG[24880] res_config_mysql.c: MySQL RealTime:
Successfully connected to database.
[Oct 16 ...] NOTICE[24880] config.c: Registered Config Engine mysql
[Oct 16 ...] VERBOSE[24880] logger.c: MySQL RealTime driver loaded.
[Oct 16 ...] VERBOSE[24880] logger.c: res_config_mysql.so => (MySQL
RealTime Configuration Driver)

They all looked fine on startup.

I did not know what I did but I bumped into something in the log that
says:
[Oct 16 ...] ERROR[24536] res_config_mysql.c: MySQL RealTime: Ping
failed (2006).  Trying an explicit reconnect.
[Oct 16 ...] DEBUG[24536] res_config_mysql.c: MySQL RealTime: Server
Error (2006): MySQL server has gone away
[Oct 16 ...] DEBUG[24536] res_config_mysql.c: MySQL RealTime:
Successfully connected to database.

Then I recalled seeing something on the Internet about MySQL timing out
on connection from Asterisk.  

I created a /etc/my.cnf and bung in something like below and restarted
both mysql and Asterisk.

[mysqld]

...
wait_timeout=60
connect_timeout=10
interactive_timeout=120

but it still does not work.

However, I believe the problem has something to do with MySQL refusing
to talk to Asterisk.
The funny thing is I never had any problem with cdr_addon_mysql.so

Maybe they work using different methodologies I reckon?

Any more thoughts?




More information about the asterisk-users mailing list