Jonas Kellens
2015-May-22 08:51 UTC
[asterisk-users] Problem with realtime mysql I can't seem to resolve
Hello I have already several Asterisk servers running with similar configuration, but now I stumble into a problem. I have mysql configuration res_config_mysql.conf : [MyAsteriskDB] dbhost = 127.0.0.1 dbname = MyAsteriskDB dbuser = astadmin dbpass = mysecret dbport = 3306 dbsock = /var/lib/mysql/mysql.sock requirements=warn ; or createclose or createchar Realtime seems to be loaded : *CLI> realtime mysql status general configured for asterisk on socket file /var/lib/mysql/mysql.sock with username asterisk. MyAsteriskDB connected to MyAsteriskDB at 127.0.0.1, port 3306 with username astadmin for 12 minutes. [May 22 10:32:02] ERROR[11269]: res_config_mysql.c:1599 mysql_reconnect: MySQL RealTime: Failed to connect database server asterisk on /var/lib/mysql/mysql.sock (err 1045). Check debug for more info. *CLI> However, SIP-registration for SIP peer can not be found : [May 22 10:32:50] NOTICE[11077]: chan_sip.c:24957 handle_request_register: Registration from '<sip:testacc66 at my.ip.ast.ser>' failed for '11.22.33.44:5060' - No matching peer found Debug logs say : [May 22 10:48:06] DEBUG[11077] res_config_mysql.c: MySQL RealTime: Connection okay. [May 22 10:48:06] DEBUG[11077] res_config_mysql.c: MySQL RealTime: Retrieve SQL: SELECT * FROM sip_buddies WHERE name = 'testacc66' AND host = 'dynamic' [May 22 10:48:06] DEBUG[11077] res_config_mysql.c: MySQL RealTime: Connection okay. [May 22 10:48:06] DEBUG[11077] res_config_mysql.c: MySQL RealTime: Retrieve SQL: SELECT * FROM sip_buddies WHERE name = 'testacc66' But sip peer testacc66 really exists in my database in table sip_buddies. It can not be found ?! What else is there for me to investigate ? Can u help me ? Thanks ! Jonas. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150522/5943f361/attachment.html>
Matt Riddell
2015-May-22 12:31 UTC
[asterisk-users] Problem with realtime mysql I can't seem to resolve
> On 22May, 2015, at 03:51, Jonas Kellens <jonas.kellens at telenet.be> wrote: > > Realtime seems to be loaded : > > *CLI> realtime mysql status > general configured for asterisk on socket file /var/lib/mysql/mysql.sock with username asterisk. > MyAsteriskDB connected to MyAsteriskDB at 127.0.0.1, port 3306 with username astadmin for 12 minutes. > [May 22 10:32:02] ERROR[11269]: res_config_mysql.c:1599 mysql_reconnect: MySQL RealTime: Failed to connect database server asterisk on /var/lib/mysql/mysql.sock (err 1045). Check debug for more info.Does MySQL work ok from the console with those parameters? I.E. mysql -u astadmin -p (then type mysecret) The debug logs and the normal logs don?t match in time - do you have some that do? -- Cheers, Matt Riddell _______________________________________________ http://www.venturevoip.com/news.php (Daily Asterisk News) http://www.venturevoip.com/pabx_on_disk.php (PABX on a Disk) http://www.venturevoip.com/exchange.php (Full ITSP Solution) http://www.venturevoip.com/cc.php (Call Centre Solutions) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150522/2fe4a0d5/attachment.html>