Hi,
There was a mistake in the file attached ; the short kamailio.cfg file (that makes kamailio to start) was not the correct one; attached the correct one.
Have anyone an idea of this problem ?
Cordialement Patrick GINHOUX
De : Ginhoux, Patrick Envoyé : lundi 20 mars 2017 17:58 À : Kamailio users (sr-users@lists.sip-router.org) sr-users@lists.sip-router.org Objet : RE: ht_db_load_table(): key type must be string (type=6)
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@lists.sip-router.orgmailto:sr-users@lists.sip-router.org) <sr-users@lists.sip-router.orgmailto:sr-users@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@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@vm-vse02-siprouter1 ~]#
modparam("htable", "fetch_rows", "1000")
[root@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@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