HI,
I try to “upgrade” my running * to RealTime support.
I’ve installed astersk-1.4.17 and asterisk-addons-1.4.5.
Writing cdr’s to my database work’s fine but my asterisk won’t access the database for Asterisk RealTime. Why I think so?
On startup asterisk reports:
== Parsing '/etc/asterisk/res_mysql.conf': Found
[Jan 20 21:24:22] WARNING[3013]: res_config_mysql.c:540 parse_config: MySQL RealTime: No database user found, using 'asterisk' as default.
[Jan 20 21:24:22] WARNING[3013]: res_config_mysql.c:547 parse_config: MySQL RealTime: No database password found, using 'asterisk' as default.
[Jan 20 21:24:22] WARNING[3013]: res_config_mysql.c:554 parse_config: MySQL RealTime: No database host found, using localhost via socket.
[Jan 20 21:24:22] WARNING[3013]: res_config_mysql.c:561 parse_config: MySQL RealTime: No database name found, using 'asterisk' as default.
[Jan 20 21:24:22] WARNING[3013]: res_config_mysql.c:568 parse_config: MySQL RealTime: No database port found, using 3306 as default.
[Jan 20 21:24:22] WARNING[3013]: res_config_mysql.c:575 parse_config: MySQL RealTime: No database socket found, using '/tmp/mysql.sock' as default.
[Jan 20 21:24:22] ERROR[3013]: res_config_mysql.c:627 mysql_reconnect: MySQL RealTime: Failed to connect database server asterisk on (err 2002). Check debug for more info.
[Jan 20 21:24:22] WARNING[3013]: res_config_mysql.c:474 load_module: MySQL RealTime: Couldn't establish connection. Check debug.
[Jan 20 21:24:22] NOTICE[3013]: config.c:1259 ast_config_engine_register: Registered Config Engine mysql
MySQL RealTime driver loaded.
res_config_mysql.so => (MySQL RealTime Configuration Driver)
== Parsing '/etc/asterisk/cdr_manager.conf': Found
cdr_manager.so => (Asterisk Manager Interface CDR Backend)
== Parsing '/etc/asterisk/extensions.conf': Found
My /etc/asterisk/res_mysql.conf is this one here: [general]
dbhost = nss
dbname = asterisk
dbuser = mark_is_a_geek
dbpass = SpEnCeR
dbport = 3306
dbsock = /var/lib/mysql/mysql.sock
Accessing my MySQL-database from my linux-konsole works fine:
[code]mysql -h nss -u mark_is_a_geek -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 999 to server version: 5.0.22
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql> status;
mysql Ver 14.12 Distrib 5.0.22, for redhat-linux-gnu (i686) using readline 5.0
Connection id: 999
Current database:
Current user: mark_is_a_geek@nss
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.22
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 3 days 23 hours 42 min 2 sec
Threads: 1 Questions: 49396 Slow queries: 0 Opens: 0 Flush tables: 1 Open tables: 25 Queries per second avg: 0.143
--------------[/code]
But why reports asterisk that the connection to the database won’t work:
[Nov 19 22:23:07] WARNING[9001] res_config_mysql.c: MySQL RealTime: No database user found, using 'asterisk' as default.
[Nov 19 22:23:07] WARNING[9001] res_config_mysql.c: MySQL RealTime: No database password found, using 'asterisk' as default.
[Nov 19 22:23:07] WARNING[9001] res_config_mysql.c: MySQL RealTime: No database host found, using localhost via socket.
[Nov 19 22:23:07] WARNING[9001] res_config_mysql.c: MySQL RealTime: No database name found, using 'asterisk' as default.
[Nov 19 22:23:07] WARNING[9001] res_config_mysql.c: MySQL RealTime: No database port found, using 3306 as default.
[Nov 19 22:23:07] WARNING[9001] res_config_mysql.c: MySQL RealTime: No database socket found, using '/tmp/mysql.sock' as default.
[Nov 19 22:23:07] ERROR[9001] res_config_mysql.c: MySQL RealTime: Failed to connect database server asterisk on (err 2002). Check debug for more info.
[Nov 19 22:23:07] WARNING[9001] res_config_mysql.c: MySQL RealTime: Couldn't establish connection. Check debug.
[Nov 19 22:23:07] NOTICE[9001] config.c: Registered Config Engine mysql
I’ve installed asterisk on a second server, but there I’ve have the same problems, so I thing I have eigher a general install-problem or I’m simple to stupid … I hope it’s the first point! So any help is welcome!
So long,
Michi