Hi all,
I am trying to use msilo module from modules_k. Unfortunately it if failing during DB initialization. Other modules are initializing fine. I am using Kamailio 3.2.2.
Not sure why the connection is not found. I tried to increase the MAX mysql connections to 250. I see the same error after I increase the connections.
The config file is pretty standard:
loadmodule "msilo.so" modparam("msilo", "add_date", 0); modparam("msilo", "db_url", DBURL); # The DBURL works for other modules...
Here is the Log output:
0(14115) DEBUG: <core> [cfg.y:1684]: loading module msilo.so 0(14115) DEBUG: <core> [sr_module.c:557]: load_module: trying to load </usr/local/kamailio-3.2.2/lib64/kamailio/modules_k/msilo.so>
.....
0(14117) DEBUG: <core> [sr_module.c:928]: DEBUG: init_mod: msilo 0(14117) DEBUG: <core> [sr_module.c:667]: find_export_record: found <db_bind_api> in module db_mysql [/usr/local/kamailio-3.2.2/lib64/kamailio/modules/db_mysql.so] 0(14117) DEBUG: <core> [db.c:212]: using db bind api for db_mysql 0(14117) DEBUG: <core> [db.c:299]: connection 0x7fc20d1ace60 not found in pool 0(14117) DEBUG: db_mysql [km_my_con.c:94]: opening connection: mysql://xxxx:xxxx@localhost/openser 0(14117) ERROR: db_mysql [km_my_con.c:109]: driver error: Access denied for user 'openser'@'localhost' (using password: YES) 0(14117) ERROR: <core> [db.c:303]: could not add connection to the pool 0(14117) ERROR: msilo [msilo.c:319]: failed to connect to the database 0(14117) ERROR: <core> [sr_module.c:932]: init_mod(): Error while initializing module msilo (/usr/local/kamailio-3.2.2/lib64/kamailio/modules_k/msilo.so) ERROR: error while initializing modules
Any help?
Thanks
Hello,
the error says the username, password or IP address are invalid to connect to mysql -- access denied. There does not seem like being other connections using same db_url, check for typos in db_url parameter.
Cheers, Daniel
On 3/3/12 12:39 AM, Krishna Kurapati wrote:
Hi all,
I am trying to use msilo module from modules_k. Unfortunately it if failing during DB initialization. Other modules are initializing fine. I am using Kamailio 3.2.2.
Not sure why the connection is not found. I tried to increase the MAX mysql connections to 250. I see the same error after I increase the connections.
The config file is pretty standard:
loadmodule "msilo.so" modparam("msilo", "add_date", 0); modparam("msilo", "db_url", DBURL); # The DBURL works for other modules...
Here is the Log output:
0(14115) DEBUG: <core> [cfg.y:1684]: loading module msilo.so 0(14115) DEBUG: <core> [sr_module.c:557]: load_module: trying to load </usr/local/kamailio-3.2.2/lib64/kamailio/modules_k/msilo.so>
.....
0(14117) DEBUG: <core> [sr_module.c:928]: DEBUG: init_mod: msilo 0(14117) DEBUG: <core> [sr_module.c:667]: find_export_record: found <db_bind_api> in module db_mysql [/usr/local/kamailio-3.2.2/lib64/kamailio/modules/db_mysql.so] 0(14117) DEBUG: <core> [db.c:212]: using db bind api for db_mysql 0(14117) DEBUG: <core> [db.c:299]: connection 0x7fc20d1ace60 not found in pool 0(14117) DEBUG: db_mysql [km_my_con.c:94]: opening connection: mysql://xxxx:xxxx@localhost/openser 0(14117) ERROR: db_mysql [km_my_con.c:109]: driver error: Access denied for user 'openser'@'localhost' (using password: YES) 0(14117) ERROR: <core> [db.c:303]: could not add connection to the pool 0(14117) ERROR: msilo [msilo.c:319]: failed to connect to the database 0(14117) ERROR: <core> [sr_module.c:932]: init_mod(): Error while initializing module msilo (/usr/local/kamailio-3.2.2/lib64/kamailio/modules_k/msilo.so) ERROR: error while initializing modules
Any help?
Thanks
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,
Thanks for the response. I looked at the DBURL and it looked just fine. I wanted to test and see if the module is reading the config param or not, I deliberately changed it to
modparam("msilo", "db_url", "mysql://root:xxxxx@localhost/openser");
When I ran it, the logs shows the user as 'openser' not the 'root' that I gave in config param. May be somewhere in the code, db_url is being overwritten by DEFAULT_DB_URL.
0(28806) DEBUG: db_mysql [km_my_con.c:94]: opening connection: mysql://xxxx:xxxx@localhost/openser 0(28806) ERROR: db_mysql [km_my_con.c:109]: driver error: Access denied for user 'openser'@'localhost' (using password: YES) 0(28806) ERROR: <core> [db.c:312]: could not add connection to the pool 0(28806) ERROR: msilo [msilo.c:365]: failed to connect to the database
Thanks Krish Kura
On Sat, Mar 3, 2012 at 5:14 AM, Daniel-Constantin Mierla miconda@gmail.comwrote:
Hello,
the error says the username, password or IP address are invalid to connect to mysql -- access denied. There does not seem like being other connections using same db_url, check for typos in db_url parameter.
Cheers, Daniel
On 3/3/12 12:39 AM, Krishna Kurapati wrote:
Hi all,
I am trying to use msilo module from modules_k. Unfortunately it if failing during DB initialization. Other modules are initializing fine. I am using Kamailio 3.2.2.
Not sure why the connection is not found. I tried to increase the MAX mysql connections to 250. I see the same error after I increase the connections.
The config file is pretty standard:
loadmodule "msilo.so" modparam("msilo", "add_date", 0); modparam("msilo", "db_url", DBURL); # The DBURL works for other modules...
Here is the Log output:
0(14115) DEBUG: <core> [cfg.y:1684]: loading module msilo.so 0(14115) DEBUG: <core> [sr_module.c:557]: load_module: trying to load </usr/local/kamailio-3.2.2/lib64/kamailio/modules_k/msilo.so>
.....
0(14117) DEBUG: <core> [sr_module.c:928]: DEBUG: init_mod: msilo 0(14117) DEBUG: <core> [sr_module.c:667]: find_export_record: found <db_bind_api> in module db_mysql [/usr/local/kamailio-3.2.2/lib64/kamailio/modules/db_mysql.so] 0(14117) DEBUG: <core> [db.c:212]: using db bind api for db_mysql 0(14117) DEBUG: <core> [db.c:299]: connection 0x7fc20d1ace60 not found in pool 0(14117) DEBUG: db_mysql [km_my_con.c:94]: opening connection: mysql://xxxx:xxxx@localhost/openser 0(14117) ERROR: db_mysql [km_my_con.c:109]: driver error: Access denied for user 'openser'@'localhost' (using password: YES) 0(14117) ERROR: <core> [db.c:303]: could not add connection to the pool 0(14117) ERROR: msilo [msilo.c:319]: failed to connect to the database 0(14117) ERROR: <core> [sr_module.c:932]: init_mod(): Error while initializing module msilo (/usr/local/kamailio-3.2.2/lib64/kamailio/modules_k/msilo.so) ERROR: error while initializing modules
Any help?
Thanks
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- http://www.asipto.comhttp://linkedin.com/in/miconda -- http://twitter.com/miconda
Further investigation into the issue revealed that the db_conn in the module_init is failing... When I commented out the code, the module is initialized ok. Not sure if this is will fine.
#if 0 db_con = msilo_dbf.init(&ms_db_url); if (!db_con) { LM_ERR("failed to connect to the database\n"); return -1; }
if(db_check_table_version(&msilo_dbf, db_con, &ms_db_table, S_TABLE_VERSION) < 0) { LM_ERR("error during table version check.\n"); return -1; } if(db_con) msilo_dbf.close(db_con); db_con = NULL; #endif
Is the module not suppose to connect to database in the module init?
Thanks
On Sat, Mar 3, 2012 at 10:13 AM, Krishna Kurapati kkurapat@gmail.comwrote:
Hi,
Thanks for the response. I looked at the DBURL and it looked just fine. I wanted to test and see if the module is reading the config param or not, I deliberately changed it to
modparam("msilo", "db_url", "mysql://root:xxxxx@localhost/openser");
When I ran it, the logs shows the user as 'openser' not the 'root' that I gave in config param. May be somewhere in the code, db_url is being overwritten by DEFAULT_DB_URL.
0(28806) DEBUG: db_mysql [km_my_con.c:94]: opening connection: mysql://xxxx:xxxx@localhost/openser 0(28806) ERROR: db_mysql [km_my_con.c:109]: driver error: Access denied for user 'openser'@'localhost' (using password: YES) 0(28806) ERROR: <core> [db.c:312]: could not add connection to the pool 0(28806) ERROR: msilo [msilo.c:365]: failed to connect to the database
Thanks Krish Kura
On Sat, Mar 3, 2012 at 5:14 AM, Daniel-Constantin Mierla < miconda@gmail.com> wrote:
Hello,
the error says the username, password or IP address are invalid to connect to mysql -- access denied. There does not seem like being other connections using same db_url, check for typos in db_url parameter.
Cheers, Daniel
On 3/3/12 12:39 AM, Krishna Kurapati wrote:
Hi all,
I am trying to use msilo module from modules_k. Unfortunately it if failing during DB initialization. Other modules are initializing fine. I am using Kamailio 3.2.2.
Not sure why the connection is not found. I tried to increase the MAX mysql connections to 250. I see the same error after I increase the connections.
The config file is pretty standard:
loadmodule "msilo.so" modparam("msilo", "add_date", 0); modparam("msilo", "db_url", DBURL); # The DBURL works for other modules...
Here is the Log output:
0(14115) DEBUG: <core> [cfg.y:1684]: loading module msilo.so 0(14115) DEBUG: <core> [sr_module.c:557]: load_module: trying to load </usr/local/kamailio-3.2.2/lib64/kamailio/modules_k/msilo.so>
.....
0(14117) DEBUG: <core> [sr_module.c:928]: DEBUG: init_mod: msilo 0(14117) DEBUG: <core> [sr_module.c:667]: find_export_record: found <db_bind_api> in module db_mysql [/usr/local/kamailio-3.2.2/lib64/kamailio/modules/db_mysql.so] 0(14117) DEBUG: <core> [db.c:212]: using db bind api for db_mysql 0(14117) DEBUG: <core> [db.c:299]: connection 0x7fc20d1ace60 not found in pool 0(14117) DEBUG: db_mysql [km_my_con.c:94]: opening connection: mysql://xxxx:xxxx@localhost/openser 0(14117) ERROR: db_mysql [km_my_con.c:109]: driver error: Access denied for user 'openser'@'localhost' (using password: YES) 0(14117) ERROR: <core> [db.c:303]: could not add connection to the pool 0(14117) ERROR: msilo [msilo.c:319]: failed to connect to the database 0(14117) ERROR: <core> [sr_module.c:932]: init_mod(): Error while initializing module msilo (/usr/local/kamailio-3.2.2/lib64/kamailio/modules_k/msilo.so) ERROR: error while initializing modules
Any help?
Thanks
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- http://www.asipto.comhttp://linkedin.com/in/miconda -- http://twitter.com/miconda
Hi,
It finally worked. I reconstructed the config file step by step with the same modparam() and it worked. Still not sure what really was wrong before.
The other day, I tried to create routes for sending asynchronous messages to web service and the entire system stopped working. The routes became empty. The config parser never complained. I rebuilt the config file and checked to see if the file is ok by running Kamailio step by step. I could not trust kamailio config check since it is the one that threw me off track.
Are there any best practices out there in constructing long config file? Is it possible to create smaller modular config files and link them to create the system? Or a better tool to identify errors in the config file?
Best, Krish Kura
On Sat, Mar 3, 2012 at 11:16 AM, Krishna Kurapati kkurapat@gmail.comwrote:
Further investigation into the issue revealed that the db_conn in the module_init is failing... When I commented out the code, the module is initialized ok. Not sure if this is will fine.
#if 0 db_con = msilo_dbf.init(&ms_db_url); if (!db_con) { LM_ERR("failed to connect to the database\n"); return -1; }
if(db_check_table_version(&msilo_dbf, db_con, &ms_db_table,
S_TABLE_VERSION) < 0) { LM_ERR("error during table version check.\n"); return -1; } if(db_con) msilo_dbf.close(db_con); db_con = NULL; #endif
Is the module not suppose to connect to database in the module init?
Thanks
On Sat, Mar 3, 2012 at 10:13 AM, Krishna Kurapati kkurapat@gmail.comwrote:
Hi,
Thanks for the response. I looked at the DBURL and it looked just fine. I wanted to test and see if the module is reading the config param or not, I deliberately changed it to
modparam("msilo", "db_url", "mysql://root:xxxxx@localhost/openser");
When I ran it, the logs shows the user as 'openser' not the 'root' that I gave in config param. May be somewhere in the code, db_url is being overwritten by DEFAULT_DB_URL.
0(28806) DEBUG: db_mysql [km_my_con.c:94]: opening connection: mysql://xxxx:xxxx@localhost/openser 0(28806) ERROR: db_mysql [km_my_con.c:109]: driver error: Access denied for user 'openser'@'localhost' (using password: YES) 0(28806) ERROR: <core> [db.c:312]: could not add connection to the pool 0(28806) ERROR: msilo [msilo.c:365]: failed to connect to the database
Thanks Krish Kura
On Sat, Mar 3, 2012 at 5:14 AM, Daniel-Constantin Mierla < miconda@gmail.com> wrote:
Hello,
the error says the username, password or IP address are invalid to connect to mysql -- access denied. There does not seem like being other connections using same db_url, check for typos in db_url parameter.
Cheers, Daniel
On 3/3/12 12:39 AM, Krishna Kurapati wrote:
Hi all,
I am trying to use msilo module from modules_k. Unfortunately it if failing during DB initialization. Other modules are initializing fine. I am using Kamailio 3.2.2.
Not sure why the connection is not found. I tried to increase the MAX mysql connections to 250. I see the same error after I increase the connections.
The config file is pretty standard:
loadmodule "msilo.so" modparam("msilo", "add_date", 0); modparam("msilo", "db_url", DBURL); # The DBURL works for other modules...
Here is the Log output:
0(14115) DEBUG: <core> [cfg.y:1684]: loading module msilo.so 0(14115) DEBUG: <core> [sr_module.c:557]: load_module: trying to load </usr/local/kamailio-3.2.2/lib64/kamailio/modules_k/msilo.so>
.....
0(14117) DEBUG: <core> [sr_module.c:928]: DEBUG: init_mod: msilo 0(14117) DEBUG: <core> [sr_module.c:667]: find_export_record: found <db_bind_api> in module db_mysql [/usr/local/kamailio-3.2.2/lib64/kamailio/modules/db_mysql.so] 0(14117) DEBUG: <core> [db.c:212]: using db bind api for db_mysql 0(14117) DEBUG: <core> [db.c:299]: connection 0x7fc20d1ace60 not found in pool 0(14117) DEBUG: db_mysql [km_my_con.c:94]: opening connection: mysql://xxxx:xxxx@localhost/openser 0(14117) ERROR: db_mysql [km_my_con.c:109]: driver error: Access denied for user 'openser'@'localhost' (using password: YES) 0(14117) ERROR: <core> [db.c:303]: could not add connection to the pool 0(14117) ERROR: msilo [msilo.c:319]: failed to connect to the database 0(14117) ERROR: <core> [sr_module.c:932]: init_mod(): Error while initializing module msilo (/usr/local/kamailio-3.2.2/lib64/kamailio/modules_k/msilo.so) ERROR: error while initializing modules
Any help?
Thanks
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- http://www.asipto.comhttp://linkedin.com/in/miconda -- http://twitter.com/miconda
On Tuesday 06 March 2012, Krishna Kurapati wrote:
It finally worked. I reconstructed the config file step by step with the same modparam() and it worked. Still not sure what really was wrong before.
The other day, I tried to create routes for sending asynchronous messages to web service and the entire system stopped working. The routes became empty. The config parser never complained. I rebuilt the config file and checked to see if the file is ok by running Kamailio step by step. I could not trust kamailio config check since it is the one that threw me off track.
Are there any best practices out there in constructing long config file? Is it possible to create smaller modular config files and link them to create the system? Or a better tool to identify errors in the config file?
Hi Krishna,
just some small suggestions, I'd suggest that you modularize your cfg in smaller parts by using sub-routes which you call then from the main routing logic. You can also use the "include" directive to move certain parts of the configuration to separate files.
Viele Grüße/ best regards,
Henning Westerholt
Thanks for the advice. Krish
On Tue, Mar 6, 2012 at 10:35 AM, Henning Westerholt hw@kamailio.org wrote:
On Tuesday 06 March 2012, Krishna Kurapati wrote:
It finally worked. I reconstructed the config file step by step with the same modparam() and it worked. Still not sure what really was wrong before.
The other day, I tried to create routes for sending asynchronous messages to web service and the entire system stopped working. The routes became empty. The config parser never complained. I rebuilt the config file and checked to see if the file is ok by running Kamailio step by step. I
could
not trust kamailio config check since it is the one that threw me off track.
Are there any best practices out there in constructing long config file? Is it possible to create smaller modular config files and link them to create the system? Or a better tool to identify errors in the config
file?
Hi Krishna,
just some small suggestions, I'd suggest that you modularize your cfg in smaller parts by using sub-routes which you call then from the main routing logic. You can also use the "include" directive to move certain parts of the configuration to separate files.
Viele Grüße/ best regards,
Henning Westerholt