[sr-dev] [kamailio/kamailio] presence_xml db_url param can not set (#1809)

Cui Gang notifications at github.com
Sun Jan 13 03:25:52 CET 2019


I found a confusing thing. I simplified the configuration file
```
debug=3

/* set paths to location of modules */
mpath="/usr/local/kamailio/lib64/kamailio/modules/"

loadmodule "db_mysql.so"
loadmodule "tm.so"
loadmodule "sl.so"

loadmodule "presence.so"
loadmodule "presence_xml.so"

modparam("presence_xml", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio52")

request_route {
	exit;
}
```
#### Log Messages
About db_url
```
0(4147) DEBUG: <core> [core/modparam.c:83]: set_mod_param_regex(): 'presence_xml' matches module 'presence_xml'
 0(4147) DEBUG: <core> [core/sr_module.c:711]: find_param_export(): found <db_url> in module presence_xml [/usr/local/kamailio/lib64/kamailio/modules/presence_xml.so]
 0(4147) DEBUG: <core> [core/modparam.c:99]: set_mod_param_regex(): found <db_url> in module presence_xml [/usr/local/kamailio/lib64/kamailio/modules/presence_xml.so]
...
0(4149) DEBUG: <core> [core/sr_module.c:896]: init_mod(): presence
 0(4149) DEBUG: presence [presence.c:282]: mod_init(): db_url=mysql://kamailio:kamailiorw@localhost/kamailio52/48/0x106853338
...
0(4149) DEBUG: <core> [core/sr_module.c:896]: init_mod(): presence_xml
 0(4149) DEBUG: presence_xml [presence_xml.c:159]: mod_init(): db_url=mysql://kamailio:kamailiorw@localhost/kamailio/46/0x1079a7d64
...
 0(4149) DEBUG: db_mysql [km_my_con.c:108]: db_mysql_new_connection(): opening connection: mysql://xxxx:xxxx@localhost/kamailio
 0(4149) ERROR: db_mysql [km_my_con.c:139]: db_mysql_new_connection(): driver error: Unknown database 'kamailio'
 0(4149) ERROR: <core> [db.c:319]: db_do_init2(): could not add connection to the pool 0(4149) ERROR: presence_xml [presence_xml.c:214]: mod_init(): while connecting to database
 0(4149) ERROR: <core> [core/sr_module.c:899]: init_mod(): Error while initializing module presence_xml (/usr/local/kamailio/lib64/kamailio/modules/presence_xml.so)
ERROR: error while initializing modules
```
I set presence_xml db_url only. But why presence db_url be set? And presence_xml db_url still is the default value.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1809#issuecomment-453796536
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190112/2390603b/attachment.html>


More information about the sr-dev mailing list