[SR-Users] kamcmd htable.reload propertiesHash problem
Ginhoux, Patrick
patrick.ginhoux at fr.unisys.com
Thu Aug 2 08:43:50 CEST 2018
Does anybody encounter a problem with the kamcmd htable.reload
propertiesHash command ?
Cordialement.
Patrick GINHOUX
Unisys | +33 1 46 69 52 12 | +33 6 60 32 24 74 | patrick.ginhoux at unisys.com
De : sr-users <sr-users-bounces at lists.kamailio.org> De la part de Ginhoux,
Patrick
Envoyé : mardi 24 juillet 2018 10:20
À : Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Objet : [SR-Users] kamcmd htable.reload propertiesHash problem
Hi,
I run Kamailio 5.0.1 with MariaDB database.
There is no issue at the initialization, meaning the db is opened by
kamailio and the hash tables loaded from the db tables.
Example:
# kamcmd htable.dump propertiesHash
{
entry: 1
size: 1
slot: {
item: {
name: cfg.env
But the htable.reload command fails:
error: 500 - Failed to open htable db connection
The Kamailio log reports that it cant connect the db :
DEBUG: ctl [../../core/io_wait.h:380]: io_watch_add(): DBG:
io_watch_add(0x7f68c74ab300, 10, 3, 0xdc9410), fd_no=1
DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read:
new connection (1) on /var/run/kamailio//kamailio_ctl
DEBUG: <core> [core/sr_module.c:694]: find_mod_export_record():
find_export_record: found <db_bind_api> in module db_mysql
[/usr/lib64/kamailio/modules/db_mysql.so]
DEBUG: <core> [db.c:209]: db_bind_mod(): using db bind api for db_mysql
DEBUG: <core> [db.c:314]: db_do_init2(): connection 0x7f68cc354c10 not found
in pool
DEBUG: db_mysql [km_my_con.c:98]: db_mysql_new_connection(): opening
connection: mysql://xxxx:xxxx@/siprouter
ERROR: db_mysql [km_my_con.c:124]: 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")
ERROR: <core> [db.c:318]: db_do_init2(): could not add connection to the
pool
ERROR: htable [ht_db.c:92]: ht_db_open_con(): failed to connect to the
database
My local db is located at /myqdata/mysiprdb/data where is the mysiprdb.sock
file. But the log shows that Kamailio is looking for
/var/lib/mysql/mysql.sock.
Does this error make sense to you ?
Is it possible to fix this problem by configuration in Kamailio ?
My kamailio.cfg script contains :
# ----- htable
modparam("htable", "db_url", "mysql://[kamailio]/siprouter")
modparam("htable", "fetch_rows", 1000)
modparam("htable", "htable", "mbxrangeHash=>size=4;dbtable=mbxrange;")
modparam("htable", "htable", "abpqHash=>size=12;dbtable=abpq;")
modparam("htable", "htable", "zabpqHash=>size=12;dbtable=zabpq;")
modparam("htable", "htable", "propertiesHash=>size=4;dbtable=properties;")
In the /myqdata/mysiprdb/data/my.cnf, I added the following entries for
Kamailio:
[kamailio]
socket = /myqdata/mysiprdb/data/mysiprdb.sock
user = siprouter
password = ##########
default-character-set = utf8
Thanks all for help.
Cordialement.
Patrick GINHOUX
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180802/05044246/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 7876 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180802/05044246/attachment.bin>
More information about the sr-users
mailing list