[SR-Users] Kamailio and mysql connection error: db_mysql [km_my_con.c:109]: driver error:

5060 toasterisk at gmail.com
Mon May 5 03:54:56 CEST 2014


hello:
I changed the line:
#!ifdef WITH_MYSQL
# - database URL - used to connect to database server by modules such
#       as: auth_db, acc, usrloc, a.s.o.
#!define DBURL "mysql://openser:openserrw@localhost/openser"
#!ifdef WITH_ASTERISK
#!define DBASTURL "mysql://asterisk:111111@localhost/asterisk"
#!endif
---------------------------------------------------------
i can connect with asterisk database, but the openser still got a problem.
this is the error found from kamailio -ddddd:
#!ifdef WITH_MYSQL
# - database URL - used to connect to database server by modules such
#       as: auth_db, acc, usrloc, a.s.o.
#!define DBURL "mysql://openser:openserrw@localhost/openser"
#!ifdef WITH_ASTERISK
#!define DBASTURL "mysql://asterisk:111111@localhost/asterisk"
#!endif
-----------------------------------------------------------------
I am little confused for kamailio and asterisk real time. I have few
questions to ask:
1) what should i register from the domain on xlite? do I register into
asterisk or register into kamailio?
2)   why kamctl ul show command has no any users, but my xlite shows READY?
root at kamailio:/usr/local/etc/kamailio# kamctl ul show
Domain:: location table=512 records=0 max_slot=
3) kamctl online show empty.
4) how can i verify  kamailio and asterisk integration is working? the log
shows working?
 6(1803) NOTICE: acc [acc.c:275]: ACC: call missed:
timestamp=1399253722;method=INVITE;from_tag=as6f7eaf7e;to_tag=2000218801;call_id=
144595df6bff5b471a5b517a7c11e457 at 192.168.1.116;code=487;reason=Request
Terminated;src_user=102;src_domain=192.168.1.116;src_ip=192.168.1.153;dst_ouser=102;dst_user=102;dst_domain=192.168.1.105
 3(1833) DEBUG: mi_fifo [mi_parser.c:84]: end of fifo input tr

thanks for all of you.


2014-05-04 20:56 GMT+08:00 VOIP Tests <kamailio.fs at gmail.com>:

> Have you granted DB access to Kamailio...?
>
> GRANT ALL ON kamailio.* TO DB_USERNAME@'KAMAIALIO_IP' IDENTIFIED BY
> 'DBPASSWORD....';
>
>
> On Sun, May 4, 2014 at 2:32 AM, toasterisk <toasterisk at gmail.com> wrote:
>
>> hello, all of users:
>> I am using this link for kamalio+asterisk+mysql:
>>
>> http://kb.asipto.com/asterisk:realtime:kamailio-3.3.x-asterisk-10.7.0-astdb
>> i do everything based on the link, only different thing is I installed
>> Kamalio+mysql at same server, and asterisk in another server.
>> currently, my asterisk can connect with the remove MYSQL server, but
>> kamailio can not connect with that.
>> when start up the kamailio, i got the error message:
>> ------------------------------------------
>> 0(3739) DEBUG: <core> [sruid.c:100]: root for sruid is
>> [uloc-5365e604-e9b-] (0 / 18)
>>  0(3739) DEBUG: <core> [sr_module.c:892]: DEBUG: init_mod_child (1): ctl
>>  0(3739) DEBUG: <core> [sr_module.c:892]: DEBUG: init_mod_child (1):
>> mi_rpc
>>  0(3739) DEBUG: <core> [sr_module.c:892]: DEBUG: init_mod_child (1): acc
>>  0(3739) DEBUG: <core> [sr_module.c:892]: DEBUG: init_mod_child (1):
>> auth_db
>>  0(3739) DEBUG: <core> [db.c:316]: connection 0xb71aab90 not found in pool
>>  0(3739) DEBUG: db_mysql [km_my_con.c:94]: opening connection:
>> mysql://xxxx:xxxx@localhost/asterisk
>>  0(3739) ERROR: db_mysql [km_my_con.c:109]: driver error: Access denied
>> for user 'asterisk'@'localhost' (using password: YES)
>>  0(3739) ERROR: <core> [db.c:320]: could not add connection to the pool
>> 0(3739) ERROR: auth_db [authdb_mod.c:174]: unable to connect to the database
>>  0(3739) ERROR: <core> [sr_module.c:896]: init_mod_child(): Error while
>> initializing module auth_db (/usr/local/lib/kamailio/modules_k/auth_db.so)
>>  0(3739) ERROR: <core> [main.c:1433]: main_dontfork: init_child failed
>>  4(3744) INFO: <core> [main.c:851]: INFO: signal 15 received
>>  3(3743) INFO: <core> [main.c:851]: INFO: signal 15 received
>>  0(3739) INFO: <core> [main.c:797]: INFO: dont_fork turned on, living on
>>  0(3739) ALERT: <core> [main.c:782]: child process 3743 exited normally,
>> status=0
>>  0(3739) ALERT: <core> [main.c:782]: child process 3744 exited normally,
>> status=0
>>  0(3739) INFO: <core> [main.c:797]: INFO: dont_fork turned on, living on
>>  0(3739) DEBUG: <core> [db_pool.c:97]: connection still kept in the pool
>>  0(3739) DEBUG: tm [t_funcs.c:122]: DEBUG: tm_shutdown : start
>>  0(3739) DEBUG: tm [t_funcs.c:125]: DEBUG: tm_shutdown : emptying hash
>> table
>>  0(3739) DEBUG: tm [t_funcs.c:127]: DEBUG: tm_shutdown : removing
>> semaphores
>>  0(3739) DEBUG: tm [t_funcs.c:129]: DEBUG: tm_shutdown : destroying tmcb
>> lists
>>  0(3739) DEBUG: tm [t_funcs.c:132]: DEBUG: tm_shutdown : done
>>  0(3739) DEBUG: <core> [mem/shm_mem.c:242]: shm_mem_destroy
>>  0(3739) DEBUG: <core> [mem/shm_mem.c:245]: destroying the shared memory
>> lock
>>
>> ---------------------------------------------------------------------------------------------------------------------------
>> [MySQL-asterisk]
>> Description = MySQL Asterisk database
>> Trace = Off
>> TraceFile = stderr
>> Driver = MySQL
>> SERVER = 192.168.1.116  // IP for kamailio and mysql
>>  USER = asterisk
>> PASSWORD = 111111
>> PORT = 3306
>> DATABASE = asterisk
>> -----------------use isql test---------------
>> root at kamailio:/etc# isql -v ODBC
>> [IM002][unixODBC][Driver Manager]Data source name not found, and no
>> default driver specified
>> [ISQL]ERROR: Could not SQLConnect
>> root at kamailio:/etc#
>> -----------------------------------------------------------
>> anyone knows the problem?
>> thanks!
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140505/a064bde7/attachment.html>


More information about the sr-users mailing list