Hello,
I am considering to release Kamailio v5.0.1 sometime next week, likely
on Wednesday, April 5, 2017. Should anyone be aware of issues not listed
yet on bug tracker, report them there as soon as possible to try to fix.
Soon after, we should release a new version from branch 4.4 and the last
one from branch 4.3.
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
Module: kamailio
Branch: master
Commit: fc732895c19f2e9fcb00c8b55d5eee0c4fffaf52
URL: https://github.com/kamailio/kamailio/commit/fc732895c19f2e9fcb00c8b55d5eee0…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-04-05T09:46:40+02:00
modules: readme files regenerated - mtree ... [skip ci]
---
Modified: src/modules/mtree/README
---
Diff: https://github.com/kamailio/kamailio/commit/fc732895c19f2e9fcb00c8b55d5eee0…
Patch: https://github.com/kamailio/kamailio/commit/fc732895c19f2e9fcb00c8b55d5eee0…
---
diff --git a/src/modules/mtree/README b/src/modules/mtree/README
index 541d744..18f3386 100644
--- a/src/modules/mtree/README
+++ b/src/modules/mtree/README
@@ -175,14 +175,15 @@ modparam("mtree", "db_url", "dbdriver://username:password@dbhost/dbname")
3.2. db_table (string)
- Name of database table where data for trees is stored. It is ignored if
- a 'mtree' parameter is defined.
+ Name of database table where data for many trees is stored. It is
+ ignored if a 'mtree' parameter is defined. The SQL scripts creates a
+ table named 'mtrees' that can be used for this parameter.
- Default value is “mtrees”.
+ Default value is “” (no table name).
Example 1.2. Set db_table parameter
...
-modparam("mtree", "db_table", "mymtrees")
+modparam("mtree", "db_table", "mtrees")
...
3.3. mtree (string)
Module: kamailio
Branch: 5.0
Commit: deefd28f893bee96f91591dec9d3ec93c39cf3c1
URL: https://github.com/kamailio/kamailio/commit/deefd28f893bee96f91591dec9d3ec9…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-04-05T09:46:20+02:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/mtree/README
---
Diff: https://github.com/kamailio/kamailio/commit/deefd28f893bee96f91591dec9d3ec9…
Patch: https://github.com/kamailio/kamailio/commit/deefd28f893bee96f91591dec9d3ec9…
---
diff --git a/src/modules/mtree/README b/src/modules/mtree/README
index 541d744..18f3386 100644
--- a/src/modules/mtree/README
+++ b/src/modules/mtree/README
@@ -175,14 +175,15 @@ modparam("mtree", "db_url", "dbdriver://username:password@dbhost/dbname")
3.2. db_table (string)
- Name of database table where data for trees is stored. It is ignored if
- a 'mtree' parameter is defined.
+ Name of database table where data for many trees is stored. It is
+ ignored if a 'mtree' parameter is defined. The SQL scripts creates a
+ table named 'mtrees' that can be used for this parameter.
- Default value is “mtrees”.
+ Default value is “” (no table name).
Example 1.2. Set db_table parameter
...
-modparam("mtree", "db_table", "mymtrees")
+modparam("mtree", "db_table", "mtrees")
...
3.3. mtree (string)
### Description
I have 2 mtrees defined that get loaded on startup. I have not specified the `db_table` value but have changed each of the values for `tname_column`, `tprefix_column`, and `tvalue_column`.
`kamcmd mtree.summary` and `kamcmd mtree.list` show that the data was successfully loaded. I expected that running `kamcmd mtree.reload` would reload these mtrees from the database. Running this or sending the same command as an http xmlrpc request yields "error: 500 - Mtree Reload Failed". The same error is received if I try to reload a specific mtree. Prior to this version we were successfully reloading these mtrees with MI commands.
### Troubleshooting
#### Reproduction
Use the following mtree paramters with a database table that has the name, prefix, and value fields.
```
modparam("mtree", "tname_column", "name")
modparam("mtree", "tprefix_column", "prefix")
modparam("mtree", "tvalue_column", "value")
modparam("mtree", "mtree", "name=some_mtree;dbtable=some_table;type=0;multi=0")
```
Verify the mtrees were successfully created and attempt to reload with the mtree.reload RPC command.
We are not using an mtrees table and this throws an error that the table does not exist (see logs below). Try creating the mtrees table according to the script located at utils/kamctl/mysql/mtree-create.sql and insert the tname, tprefix, and tvalue values used above. The same error is thrown with a different log entry.
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
Without mtrees table:
```
Apr 4 21:45:51 localhost /usr/local/sbin/kamailio[26416]: ERROR: db_mysql [km_dbase.c:128]: db_mysql_submit_query(): driver error on query: Table 'db_name.mtrees' doesn't exist (1146)
Apr 4 21:45:51 localhost /usr/local/sbin/kamailio[26416]: ERROR: <core> [db_query.c:132]: db_do_query_internal(): error while submitting query
Apr 4 21:45:51 localhost /usr/local/sbin/kamailio[26416]: ERROR: mtree [mtree_mod.c:724]: mt_load_db_trees(): Error while querying db
Apr 4 21:45:51 localhost /usr/local/sbin/kamailio[26416]: ERROR: mtree [mtree_mod.c:928]: rpc_mtree_reload(): cannot re-load mtrees from database
```
With mtrees table:
```
Apr 4 21:41:47 localhost /usr/local/sbin/kamailio[26416]: ERROR: db_mysql [km_dbase.c:128]: db_mysql_submit_query(): driver error on query: Unknown column 'name' in 'field list' (1054)
Apr 4 21:41:47 localhost /usr/local/sbin/kamailio[26416]: ERROR: <core> [db_query.c:132]: db_do_query_internal(): error while submitting query
Apr 4 21:41:47 localhost /usr/local/sbin/kamailio[26416]: ERROR: mtree [mtree_mod.c:724]: mt_load_db_trees(): Error while querying db
Apr 4 21:41:47 localhost /usr/local/sbin/kamailio[26416]: ERROR: mtree [mtree_mod.c:928]: rpc_mtree_reload(): cannot re-load mtrees from database
```
### Additional Information
According to the documentation found here: http://kamailio.org/docs/modules/5.0.x/modules/mtree.html the db_table param should be ignored if a mtree paramter is defined so I would not expect to need the mtrees table. The data is successfully loaded at startup so I believe the issue is just with the reload command. Our kamailio config and database schema has not changed and we were able to reload mtrees successfully with MI commands in previous releases.
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.0.0 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 14:35:44 Apr 4 2017 with gcc 4.8.5
```
* **Operating System**:
```
Linux proxy.vagrant.vm 3.10.0-514.6.2.el7.x86_64 #1 SMP Thu Feb 23 03:04:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux release 7.3.1611 (Core)
```
--
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/1057
Module: kamailio
Branch: 5.0
Commit: 2df615b6891d822d9e892513b13ff48a3be22faa
URL: https://github.com/kamailio/kamailio/commit/2df615b6891d822d9e892513b13ff48…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-04-05T09:39:03+02:00
mtree: clarifications about db table parameter in docs
(cherry picked from commit 1c1e51388aad6c5ba064c283d5e124367b30ad7e)
---
Modified: src/modules/mtree/doc/mtree_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/2df615b6891d822d9e892513b13ff48…
Patch: https://github.com/kamailio/kamailio/commit/2df615b6891d822d9e892513b13ff48…
---
diff --git a/src/modules/mtree/doc/mtree_admin.xml b/src/modules/mtree/doc/mtree_admin.xml
index ec6b2d1..0162e32 100644
--- a/src/modules/mtree/doc/mtree_admin.xml
+++ b/src/modules/mtree/doc/mtree_admin.xml
@@ -86,19 +86,20 @@ modparam("mtree", "db_url", "&exampledb;")
<section>
<title><varname>db_table</varname> (string)</title>
<para>
- Name of database table where data for trees is stored. It is ignored if a
- 'mtree' parameter is defined.
+ Name of database table where data for many trees is stored. It is ignored
+ if a 'mtree' parameter is defined. The SQL scripts creates a table named
+ 'mtrees' that can be used for this parameter.
</para>
<para>
<emphasis>
- Default value is <quote>mtrees</quote>.
+ Default value is <quote></quote> (no table name).
</emphasis>
</para>
<example>
<title>Set <varname>db_table</varname> parameter</title>
<programlisting format="linespecific">
...
-modparam("mtree", "db_table", "mymtrees")
+modparam("mtree", "db_table", "mtrees")
...
</programlisting>
</example>
Module: kamailio
Branch: master
Commit: 1c1e51388aad6c5ba064c283d5e124367b30ad7e
URL: https://github.com/kamailio/kamailio/commit/1c1e51388aad6c5ba064c283d5e1243…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-04-05T09:36:17+02:00
mtree: clarifications about db table parameter in docs
---
Modified: src/modules/mtree/doc/mtree_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/1c1e51388aad6c5ba064c283d5e1243…
Patch: https://github.com/kamailio/kamailio/commit/1c1e51388aad6c5ba064c283d5e1243…
---
diff --git a/src/modules/mtree/doc/mtree_admin.xml b/src/modules/mtree/doc/mtree_admin.xml
index ec6b2d1..0162e32 100644
--- a/src/modules/mtree/doc/mtree_admin.xml
+++ b/src/modules/mtree/doc/mtree_admin.xml
@@ -86,19 +86,20 @@ modparam("mtree", "db_url", "&exampledb;")
<section>
<title><varname>db_table</varname> (string)</title>
<para>
- Name of database table where data for trees is stored. It is ignored if a
- 'mtree' parameter is defined.
+ Name of database table where data for many trees is stored. It is ignored
+ if a 'mtree' parameter is defined. The SQL scripts creates a table named
+ 'mtrees' that can be used for this parameter.
</para>
<para>
<emphasis>
- Default value is <quote>mtrees</quote>.
+ Default value is <quote></quote> (no table name).
</emphasis>
</para>
<example>
<title>Set <varname>db_table</varname> parameter</title>
<programlisting format="linespecific">
...
-modparam("mtree", "db_table", "mymtrees")
+modparam("mtree", "db_table", "mtrees")
...
</programlisting>
</example>