I noticed that json rpc commands have started to fail, for example,
May 2 15:41:15 char /usr/bin/sip-proxy[10440]: INFO: Executing JSON request <{"jsonrpc":"2.0","method":"siptrace.status","params":["on"],"id":1}> from <127.0.0.1> with host <127.0.0.1:6060>
May 2 15:41:15 char /usr/bin/sip-proxy[10440]: ERROR: <core> [core/parser/parse_from.c:53]: parse_from_header(): bad msg or missing FROM header
May 2 15:41:15 char /usr/bin/sip-proxy[10440]: ERROR: siptrace [siptrace_send.c:55]: sip_trace_prepare(): cannot parse FROM header
Has something changed that I have missed? I didn't find anything
related on the wiki upgrade page.
-- Juha
I build my sip proxy from today's master and it didn't start:
May 2 15:12:51 char sip-proxy[22422]: 0(22474) ERROR: <core> [core/sr_module.c:512]: load_module(): could not open module </usr/lib/x86_64-linux-gnu/sip-proxy/modules/usrloc.so>: /usr/lib/x86_64-linux-gnu/sip-proxy/modules/usrloc.so: undefined symbol: ul_cseq_delay
-- Juha
Module: kamailio
Branch: master
Commit: 66ef7ab7b078794b96ecee13f6867d5f90a8d63e
URL: https://github.com/kamailio/kamailio/commit/66ef7ab7b078794b96ecee13f6867d5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-05-02T08:47:30+02:00
kamctl: kamdbclt mysql skip creating dbrouser if same as dbrwuser
---
Modified: utils/kamctl/kamdbctl.mysql
---
Diff: https://github.com/kamailio/kamailio/commit/66ef7ab7b078794b96ecee13f6867d5…
Patch: https://github.com/kamailio/kamailio/commit/66ef7ab7b078794b96ecee13f6867d5…
---
diff --git a/utils/kamctl/kamdbctl.mysql b/utils/kamctl/kamdbctl.mysql
index bdb8b98ab4..4050371bfe 100644
--- a/utils/kamctl/kamdbctl.mysql
+++ b/utils/kamctl/kamdbctl.mysql
@@ -161,9 +161,12 @@ kamailio_db_grant () # pars: <database name>
# Users: kamailio is the regular user, kamailioro only for reading
sql_query "" "CREATE USER '${DBRWUSER}'@'$DBHOST' IDENTIFIED BY '$DBRWPW';
- GRANT ALL PRIVILEGES ON $1.* TO '${DBRWUSER}'@'$DBHOST';
- CREATE USER '${DBROUSER}'@'$DBHOST' IDENTIFIED BY '$DBROPW';
- GRANT SELECT ON $1.* TO '${DBROUSER}'@'$DBHOST';"
+ GRANT ALL PRIVILEGES ON $1.* TO '${DBRWUSER}'@'$DBHOST';"
+
+ if [ "${DBRWUSER}" != "${DBROUSER}" ] ; then
+ sql_query "" "CREATE USER '${DBROUSER}'@'$DBHOST' IDENTIFIED BY '$DBROPW';
+ GRANT SELECT ON $1.* TO '${DBROUSER}'@'$DBHOST';"
+ fi
if [ $? -ne 0 ] ; then
merr "granting privileges to database $1 failed!"
@@ -172,9 +175,11 @@ kamailio_db_grant () # pars: <database name>
if [ "$DBHOST" != "localhost" ] ; then
sql_query "" "CREATE USER '$DBRWUSER'@'localhost' IDENTIFIED BY '$DBRWPW';
- GRANT ALL PRIVILEGES ON $1.* TO '$DBRWUSER'@'localhost';
- CREATE USER '$DBROUSER'@'localhost' IDENTIFIED BY '$DBROPW';
- GRANT SELECT ON $1.* TO '$DBROUSER'@'localhost';"
+ GRANT ALL PRIVILEGES ON $1.* TO '$DBRWUSER'@'localhost';"
+ if [ "${DBRWUSER}" != "${DBROUSER}" ] ; then
+ sql_query "" "CREATE USER '$DBROUSER'@'localhost' IDENTIFIED BY '$DBROPW';
+ GRANT SELECT ON $1.* TO '$DBROUSER'@'localhost';"
+ fi
if [ $? -ne 0 ] ; then
merr "granting localhost privileges to database $1 failed!"
exit 1
@@ -183,9 +188,11 @@ kamailio_db_grant () # pars: <database name>
if [ ! -z "$DBACCESSHOST" ] ; then
sql_query "" "CREATE USER '$DBRWUSER'@'$DBACCESSHOST' IDENTIFIED BY '$DBRWPW';
- GRANT ALL PRIVILEGES ON $1.* TO '$DBRWUSER'@'$DBACCESSHOST';
- CREATE USER '$DBROUSER'@'$DBACCESSHOST' IDENTIFIED BY '$DBROPW';
- GRANT SELECT ON $1.* TO '$DBROUSER'@'$DBACCESSHOST';"
+ GRANT ALL PRIVILEGES ON $1.* TO '$DBRWUSER'@'$DBACCESSHOST';"
+ if [ "${DBRWUSER}" != "${DBROUSER}" ] ; then
+ sql_query "" "CREATE USER '$DBROUSER'@'$DBACCESSHOST' IDENTIFIED BY '$DBROPW';
+ GRANT SELECT ON $1.* TO '$DBROUSER'@'$DBACCESSHOST';"
+ fi
if [ $? -ne 0 ] ; then
merr "granting access host privileges to database $1 failed!"
exit 1
@@ -203,8 +210,11 @@ kamailio_db_revoke () # pars: <database name>
minfo "revoking privileges to database $1 ..."
# Users: kamailio is the regular user, kamailioro only for reading
- sql_query "" "REVOKE ALL PRIVILEGES ON $1.* FROM '${DBRWUSER}'@'$DBHOST';
- REVOKE SELECT ON $1.* FROM '${DBROUSER}'@'$DBHOST';"
+ sql_query "" "REVOKE ALL PRIVILEGES ON $1.* FROM '${DBRWUSER}'@'$DBHOST';"
+
+ if [ "${DBRWUSER}" != "${DBROUSER}" ] ; then
+ sql_query "" "REVOKE SELECT ON $1.* FROM '${DBROUSER}'@'$DBHOST';"
+ fi
if [ $? -ne 0 ] ; then
merr "revoking privileges to database $1 failed!"
@@ -212,8 +222,10 @@ kamailio_db_revoke () # pars: <database name>
fi
if [ "$DBHOST" != "localhost" ] ; then
- sql_query "" "REVOKE ALL PRIVILEGES ON $1.* FROM '$DBRWUSER'@'localhost';
- REVOKE SELECT ON $1.* FROM '$DBROUSER'@'localhost';"
+ sql_query "" "REVOKE ALL PRIVILEGES ON $1.* FROM '$DBRWUSER'@'localhost';"
+ if [ "${DBRWUSER}" != "${DBROUSER}" ] ; then
+ sql_query "" "REVOKE SELECT ON $1.* FROM '$DBROUSER'@'localhost';"
+ fi
if [ $? -ne 0 ] ; then
merr "granting localhost privileges to database $1 failed!"
exit 1
@@ -221,8 +233,10 @@ kamailio_db_revoke () # pars: <database name>
fi
if [ ! -z "$DBACCESSHOST" ] ; then
- sql_query "" "REVOKE ALL PRIVILEGES ON $1.* FROM '$DBRWUSER'@'$DBACCESSHOST';
- REVOKE SELECT ON $1.* FROM '$DBROUSER'@'$DBACCESSHOST';"
+ sql_query "" "REVOKE ALL PRIVILEGES ON $1.* FROM '$DBRWUSER'@'$DBACCESSHOST';"
+ if [ "${DBRWUSER}" != "${DBROUSER}" ] ; then
+ sql_query "" "REVOKE SELECT ON $1.* FROM '$DBROUSER'@'$DBACCESSHOST';"
+ fi
if [ $? -ne 0 ] ; then
merr "granting access host privileges to database $1 failed!"
exit 1
I have my hash table set to size = 16
modparam("htable", "htable", "a=>size=16;autoexpire=0;dbtable=htable;")
I had around 3000 entries in that table, some entries with more than 10 duplicate keys (key_type = 1) and we found that when reading the entries of the duplicated keys it could not go pass index 9 even though in the physical table there were 17 entries.
I deleted some old entries and now the table is about 2000 items and it seems to work properly again ,(loads all value in memory). I say seems because I can not dump all values:
```
./kamcmd htable.dump a
ERROR: reply too big
```
But I check manually all the ones that were not being loaded and they are now
Questions:
1- the size parameter is for the buckets or entries size ?
2- is 16 a good value for a table with 3000 entries? ( 2^16 is 65k so I figured it would be ok)
3- can the the way I define my key impose a limitation?
4- what is the max size for an htable to be dumped with the above command?
--
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/2311
Module: kamailio
Branch: 5.3
Commit: cca28078f7fe329046744c9b63d01bb9945a8dca
URL: https://github.com/kamailio/kamailio/commit/cca28078f7fe329046744c9b63d01bb…
Author: Donato Sciarra <donato.sciarra(a)bmw.de>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-05-01T09:55:25+02:00
core: do not use tcp id for lookup if not needed
In case the first lookup (with tcp id) is not successfull, the second
attempt should have been performed without a tcp id.
Issue was introduced with dc43750644 (new global parameter
tcp_connection_match) in 5.3.
(cherry picked from commit 24a3a172dbdecb6e987df943a3ad1acb4da664b5)
---
Modified: src/core/tcp_main.c
---
Diff: https://github.com/kamailio/kamailio/commit/cca28078f7fe329046744c9b63d01bb…
Patch: https://github.com/kamailio/kamailio/commit/cca28078f7fe329046744c9b63d01bb…
---
diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c
index 99d33ee719..1c9859f633 100644
--- a/src/core/tcp_main.c
+++ b/src/core/tcp_main.c
@@ -2029,7 +2029,7 @@ int tcp_send(struct dest_info* dst, union sockaddr_union* from,
if (likely(port)){
/* try again w/o id */
if(tcp_connection_match==TCPCONN_MATCH_STRICT) {
- c=tcpconn_lookup(dst->id, &ip, port, from, try_local_port, con_lifetime);
+ c=tcpconn_lookup(0, &ip, port, from, try_local_port, con_lifetime);
} else {
c=tcpconn_get(0, &ip, port, from, con_lifetime);
}