Hello Everyone,
I am trying start kamailio 4.2 with remote mysql server and on debug I see DEBUG: db_mysql [km_my_con.c:94]: db_mysql_new_connection(): opening connection: mysql://xxxx:xxxx@localhost/kamailio but in cfg defined actual mysql server ip and not localhost
0(28885) DEBUG: <core> [sr_module.c:695]: find_mod_export_record(): find_export_record: found <db_bind_api> in module db_mysql [/usr/lib64/kamailio/modules/db_mysql.so] 0(28885) DEBUG: <core> [db.c:213]: db_bind_mod(): using db bind api for db_mysql 0(28885) DEBUG: <core> [db.c:318]: db_do_init2(): connection 0x7faca59eced8 not found in pool 0(28885) DEBUG: db_mysql [km_my_con.c:94]: db_mysql_new_connection(): opening connection: mysql://xxxx:xxxx@localhost/kamailio 0(28885) ERROR: db_mysql [km_my_con.c:109]: db_mysql_new_connection(): driver error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory") 0(28885) ERROR: <core> [db.c:322]: db_do_init2(): could not add connection to the pool 0(28885) ERROR: dialog [dlg_db_handler.c:147]: init_dlg_db(): unable to connect to the database
Slava.
Hi Slava,
is most modules a default database connection is defined. Probably this is the case here. As this error is coming from the dialog module: Did you configure some sort of "db_mode"? e.g.: modparam("dialog", "db_mode", 1)
Thanks, Carsten
2015-01-25 9:27 GMT+02:00 Slava Bendersky volga629@skillsearch.ca:
Hello Everyone,
I am trying start kamailio 4.2 with remote mysql server and on debug I see DEBUG: db_mysql [km_my_con.c:94]: db_mysql_new_connection(): opening connection: mysql://xxxx:xxxx@localhost/kamailio but in cfg defined actual mysql server ip and not localhost
0(28885) DEBUG: <core> [sr_module.c:695]: find_mod_export_record(): find_export_record: found <db_bind_api> in module db_mysql [/usr/lib64/kamailio/modules/db_mysql.so] 0(28885) DEBUG: <core> [db.c:213]: db_bind_mod(): using db bind api for db_mysql 0(28885) DEBUG: <core> [db.c:318]: db_do_init2(): connection 0x7faca59eced8 not found in pool 0(28885) DEBUG: db_mysql [km_my_con.c:94]: db_mysql_new_connection(): opening connection: mysql://xxxx:xxxx@localhost/kamailio 0(28885) ERROR: db_mysql [km_my_con.c:109]: db_mysql_new_connection(): driver error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory") 0(28885) ERROR: <core> [db.c:322]: db_do_init2(): could not add connection to the pool 0(28885) ERROR: dialog [dlg_db_handler.c:147]: init_dlg_db(): unable to connect to the database
Slava.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Kamailio: I use Kamailio with Amazon EC2 virtual machine, it has a private ip such as 172.31.7.164, kamailio listened on this, I assigned a float public ip 54.X.X.X on it, and all the client send traffics to the public ip and it work well(REGISTER), but now I would relay kamailio's traffic to another real public server, the server found the INVITE's via header's ip address is 172.31.7.164, so it failed to response 100 trying and 200 OK to my kamalio, because it send to a private 172.31.7.164, so my question is can I change Kamailio's via header's ip value with my specified public ip? How can I do? Thanks a lot!
On 25 Jan 2015, at 14:48, dongwf dongwflj@163.com wrote:
Hi Kamailio: I use Kamailio with Amazon EC2 virtual machine, it has a private ip such as 172.31.7.164, kamailio listened on this, I assigned a float public ip 54.X.X.X on it, and all the client send traffics to the public ip and it work well(REGISTER), but now I would relay kamailio's traffic to another real public server, the server found the INVITE's via header's ip address is 172.31.7.164, so it failed to response 100 trying and 200 OK to my kamalio, because it send to a private 172.31.7.164, so my question is can I change Kamailio's via header's ip value with my specified public ip? How can I do? Thanks a lot!
The core cookbok documents the "advertise" parameter to the "listen" config setting for this case.
http://www.kamailio.org/wiki/cookbooks/4.2.x/core#listen
Go ahead and try that one.
/O
Thanks, the public ip is not a real device ip, it is a NAT external public ip, so if I listen on that, server will not work. Anyway, I found my problem is caused by firewall, so even the via header is priviate ip, I still can get response, so please ignore this question, thanks for your help.
At 2015-01-26 17:14:46, "Olle E. Johansson" oej@edvina.net wrote:
On 25 Jan 2015, at 14:48, dongwf dongwflj@163.com wrote:
Hi Kamailio: I use Kamailio with Amazon EC2 virtual machine, it has a private ip such as 172.31.7.164, kamailio listened on this, I assigned a float public ip 54.X.X.X on it, and all the client send traffics to the public ip and it work well(REGISTER), but now I would relay kamailio's traffic to another real public server, the server found the INVITE's via header's ip address is 172.31.7.164, so it failed to response 100 trying and 200 OK to my kamalio, because it send to a private 172.31.7.164, so my question is can I change Kamailio's via header's ip value with my specified public ip? How can I do? Thanks a lot!
The core cookbok documents the "advertise" parameter to the "listen" config setting for this case.
http://www.kamailio.org/wiki/cookbooks/4.2.x/core#listen
Go ahead and try that one.
/O