[SR-Users] ht_db_load_table(): key type must be string (type=6)

Ginhoux, Patrick patrick.ginhoux at fr.unisys.com
Mon Mar 20 17:57:51 CET 2017


Hi,

To figure out what causes this issue, I work to shorten my kamailio.cfg to contains loadmodule/modparam instructions for the  htable module only.

My first attempt (see kamailio.cfg.ok) shows that the problem doesn't occur.

In the second attempt (see kamailio.cfg.ko) I add instructions previously removed from the original .cfg file. I have determined that, depending on the instructions that follows the "modparam("htable", "fetch_rows", 1000)" line, the "key type must be string (type=6)" error occurs or not.
In this ko file, if I comment out the following sequence, the error occurs :

modparam("htable", "fetch_rows", 1000)
#!!ifdef FIXED_ROUTING
#modparam("htable", "htable", "mbxrangeHash=>size=4;dbtable=mbxrange;")
#!!else
#modparam("htable", "htable", "abpqHash=>size=12;dbtable=abpq;")
#modparam("htable", "htable", "zabpqHash=>size=12;dbtable=zabpq;")
#!!endif
modparam("htable", "htable", "propertiesHash=>size=4;dbtable=properties;")

I hope my explanation is clearn and there are people who can help me on this problem that causes kamailio to not start.


Cordialement
Patrick GINHOUX

De : Ginhoux, Patrick
Envoyé : vendredi 17 mars 2017 15:46
À : Kamailio users (sr-users at lists.sip-router.org) <sr-users at lists.sip-router.org>
Objet : ht_db_load_table(): key type must be string (type=6)

Hi,

Now the kamailio installation is completed, I try to start kamailio but got an error on a modparam line.

By looking at the kamailio.cfg (with debug mode) it looks like the instruction is not correct :

modparam("htable", "fetch_rows", 1000)

[root at vm-vse02-siprouter1 ~]# systemctl status kamailio.service -l
kamailio.service - SYSV: Kamailio is a fast, reliable and flexible SIP Server.
   Loaded: loaded (/etc/rc.d/init.d/kamailio)
   Active: failed (Result: exit-code) since Fri 2017-03-17 15:38:13 CET; 17s ago
  Process: 1526 ExecStart=/etc/rc.d/init.d/kamailio start (code=exited, status=1/FAILURE)

Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: INFO: pike [pike.c:99]: pike_init(): PIKE - initializing
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: INFO: pike [ip_tree.c:81]: init_lock_set(): probing 256 set size
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: INFO: cfgutils [cfgutils.c:767]: mod_init(): no hash_file given, disable hash functionality
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: ERROR: htable [ht_db.c:276]: ht_db_load_table(): key type must be string (type=6)
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: ERROR: <core> [core/sr_module.c:968]: init_mod(): Error while initializing module htable (/usr/lib64/kamailio/modules/htable.so)
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
Mar 17 15:38:13 vm-vse02-siprouter1 kamailio[1526]: Starting kamailio:
Mar 17 15:38:13 vm-vse02-siprouter1 systemd[1]: kamailio.service: control process exited, code=exited status=1
Mar 17 15:38:13 vm-vse02-siprouter1 systemd[1]: Failed to start SYSV: Kamailio is a fast, reliable and flexible SIP Server..
Mar 17 15:38:13 vm-vse02-siprouter1 systemd[1]: Unit kamailio.service entered failed state.
[root at vm-vse02-siprouter1 ~]#

modparam("htable", "fetch_rows", "1000")

[root at vm-vse02-siprouter1 ~]# systemctl status kamailio.service -l
kamailio.service - SYSV: Kamailio is a fast, reliable and flexible SIP Server.
   Loaded: loaded (/etc/rc.d/init.d/kamailio)
   Active: failed (Result: exit-code) since Fri 2017-03-17 15:26:21 CET; 3s ago
  Process: 1452 ExecStart=/etc/rc.d/init.d/kamailio start (code=exited, status=1/FAILURE)

Mar 17 15:26:20 vm-vse02-siprouter1 systemd[1]: Starting SYSV: Kamailio is a fast, reliable and flexible SIP Server....
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: Not starting : invalid configuration file!
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: 0(1460) ERROR: <core> [core/modparam.c:141]: set_mod_param_regex(): parameter <fetch_rows> of type <1> not found in module <htable>
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: 0(1460) CRITICAL: <core> [core/cfg.y:3404]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 308, column 41: Can't set module parameter
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: 0(1460) WARNING: <core> [core/cfg.y:3378]: warn_at(): warning in config file //etc/kamailio/kamailio.cfg, line 971, column 6-13: constant value in if(...)
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: ERROR: bad config file (1 errors)
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: 0(1460) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
Mar 17 15:26:21 vm-vse02-siprouter1 systemd[1]: kamailio.service: control process exited, code=exited status=1
Mar 17 15:26:21 vm-vse02-siprouter1 systemd[1]: Failed to start SYSV: Kamailio is a fast, reliable and flexible SIP Server..
Mar 17 15:26:21 vm-vse02-siprouter1 systemd[1]: Unit kamailio.service entered failed state.
[root at vm-vse02-siprouter1 ~]#

The documentation shows that fetch_rows is an integer :
 fetch_rows (integer)
How many rows to fetch at once from database.
Default value is 100.
Example 1.12. Set fetch_rows parameter
...
modparam("htable", "fetch_rows", 1000)

So how to explain the first error.

Have you any thoughts on this case ?

Cordialement
Patrick GINHOUX

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170320/8826721e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kamailio.cfg.ko
Type: application/octet-stream
Size: 9301 bytes
Desc: kamailio.cfg.ko
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170320/8826721e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kamailio.cfg.ok
Type: application/octet-stream
Size: 3435 bytes
Desc: kamailio.cfg.ok
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170320/8826721e/attachment-0001.obj>


More information about the sr-users mailing list