[SR-Users] kamcmd htable.reload propertiesHash problem

Ginhoux, Patrick patrick.ginhoux at fr.unisys.com
Fri Aug 3 07:56:28 CEST 2018


Hi Henning,

 

Instead of installing a new server, I tried to upgrade the one running the
5.0.1 level. It has the following packages installed: 

 

kamailio-perl-5.0.1-1.1.x86_64

kamailio-5.0.1-1.1.x86_64

kamailio-mysql-5.0.1-1.1.x86_64

kamailio-snmpstats-5.0.1-1.1.x86_64

 

So I have download the 5.0.7 packages into a separate folder:
kamailio-rpms_5.0.7

 

kamailio-5.0.7-1.el7.x86_64.rpm     

kamailio-mysql-5.0.7-1.el7.x86_64.rpm

kamailio-perl-5.0.7-1.el7.x86_64.rpm

kamailio-snmpstats-5.0.7-1.el7.x86_64.rpm

kamailio-ims-5.0.7-1.el7.x86_64.rpm

 

The update command “rpm -Uvh --force kamailio*” detects a dependency on the
mod_perl package :

 

warning: kamailio-5.0.7-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key
ID 941fdbdd: NOKEY

error: Failed dependencies:

        mod_perl is needed by kamailio-perl-5.0.7-1.el7.x86_64

 

I try to find this mod_perl package but it does no longer exist for RedHat
7. We can find multiple articles referencing this change in RHEL.

It seems there is an alternative way to get this module in a EPEL repository
(https://huntingbears.nl/2013/12/17/no-mod_perl-in-rhel-7-and-centos-7/).

 

It is to me a huge work to simply update my current Kamailio to 5.0.7.

 

Does this mod_perl change makes sense to you ? 

Have you an idea to get rid of this dependency?

 

Thank in advance for your suggestion .

 

Cordialement.

Patrick GINHOUX 

Unisys | +33 1 46 69 52 12 | +33 6 60 32 24 74 | patrick.ginhoux at unisys.com

 

-----Message d'origine-----
De : Ginhoux, Patrick 
Envoyé : jeudi 2 août 2018 09:33
À : 'Henning Westerholt' <hw at kamailio.org>
Cc : sr-users at lists.kamailio.org
Objet : RE: [SR-Users] kamcmd htable.reload propertiesHash problem

 

Hi Henning,

 

Thanks for your review.

 

As you said, that's strange behavior.

 

So I'm going to upgrade to 5.0.7, the time to set up a server. I'll keep you

posted asap.

 

Cordialement.

Patrick GINHOUX 

Unisys | +33 1 46 69 52 12 | +33 6 60 32 24 74 |
<mailto:patrick.ginhoux at unisys.com> patrick.ginhoux at unisys.com

 

-----Message d'origine-----

De : Henning Westerholt < <mailto:hw at kamailio.org> hw at kamailio.org> 

Envoyé : jeudi 2 août 2018 09:02

À :  <mailto:sr-users at lists.kamailio.org> sr-users at lists.kamailio.org

Cc : Ginhoux, Patrick < <mailto:patrick.ginhoux at fr.unisys.com>
patrick.ginhoux at fr.unisys.com>

Objet : Re: [SR-Users] kamcmd htable.reload propertiesHash problem

 

Am Dienstag, 24. Juli 2018, 10:20:01 CEST schrieb Ginhoux, Patrick:

> 

> 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.

 

Hello Patrick,

 

this is strange. Normally if it can initialize correctly during startup,

then 

it also should be able to use the database later on. 

 

I did a quick check of the htable module in the repository. There have been

a 

few fixes related to rpc commands and also a bit related to the database in 

the last year. But I did not saw from the git logs anything like you 

described.

 

Nevertheless, you should try to setup the latest 5.0 release (5.0.7) - maybe

 

on a test system and see if the error is also happening there. There should

be 

no changes in database or configuration comparing to 5.0.1.

 

Best regards,

 

Henning

 

> Example:

> 

> # kamcmd htable.dump propertiesHash

> [..]

> 

> But the htable.reload command fails:

> 

> error: 500 - Failed to open htable db connection

> 

> 

> 

> The Kamailio log reports that it can't 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

 

 

-- 

Henning Westerholt

 <https://skalatan.de/blog/> https://skalatan.de/blog/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180803/e0f2299f/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/20180803/e0f2299f/attachment.bin>


More information about the sr-users mailing list