fwd to the list - reply all failed in first place ... > Hello, > > the module connects in mod init to check the table version, otherwise it does > not do any message storage related operations with the database. It should > work fine at runtime even if mod init does not connect to db. > > But it is strange of mod init fails but child init goes on. Do you have a > firewall with policies related to active connections (rate of new > connections)? > > Cheers, > Daniel > > On Sat, Mar 3, 2012 at 6:16 PM, Krishna Kurapati <kkura...@gmail.com> wrote: > 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 <kkura...@gmail.com> wrote: > 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 <mico...@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 list >> sr-users@lists.sip-router.org >> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users > > -- > Daniel-Constantin Mierla -- http://www.asipto.com > http://linkedin.com/in/miconda -- http://twitter.com/miconda > > > > > > -- > Daniel-Constantin Mierla > http://www.asipto.com
_______________________________________________ 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