Hi all, I’ve been using Kamailio 4.4.4 for 8 months without any problems but in recent days, I’m having some issues with our server and, when it happens, it cannot get new registrations.
Using top I saw a kamailio process is eating all CPU.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1556 kamailio 20 0 1010884 27624 24520 R 98.5 1.4 150:07.59 kamailio
I got backtrace attaching to Kamailio with gdb. Here is the backtrace:
#0 0x00007fb996992d6d in accept () at ../sysdeps/unix/syscall-template.S:81
#1 0x00000000005f3615 in handle_new_connect (si=0x7fb9960b4fa8) at tcp_main.c:3894
#2 0x00000000005f7029 in handle_io (fm=0x7fb9961da520, ev=1, idx=-1) at tcp_main.c:4199
#3 0x00000000005c68b2 in io_wait_loop_epoll (h=0xa1fdc0 <io_h>, t=5, repeat=0) at io_wait.h:1065
#4 0x00000000005fa04a in tcp_main_loop () at tcp_main.c:4490
#5 0x00000000004b48ba in main_loop () at main.c:1712
#6 0x00000000004bad12 in main (argc=13, argv=0x7ffd14247c18) at main.c:2631
(gdb) bt
At the moment I found the issue, there were 862 sip client registered correctly.
Our server is configured to use only TLS and mysql as backend.
/usr/local/sbin/kamailio -v
version: kamailio 4.4.4 (x86_64/linux) 852c47
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: 852c47
compiled on 15:56:18 Dec 15 2016 with gcc 4.8.4
Can anyone address me to find out why this happens?
Many thanks,
T.
Tomas Zanet
R&D Software designer
tzanet(a)came.com
CAME S.p.A.
Hi,
I’m trying to build a testbed using the VMware image you kindly have shared
here: https://www.kamailio.org/w/2016/02/kamailio-ims-getting-started-box/
<https://clicktime.symantec.com/a/1/vpQmnO-RuJyqB1aW492eOeLkb1WD1yyoCCaN-pca…>
My configuration details:
HSS - 10.200.8.171 (VM1)
PCSCF - 10.200.8.175 (VM2)
ICSCF - 10.200.8.178 (VM3)
SCSCF - 10.200.8.181 (VM4)
While issuing the command ./hss.sh and kamailio -f
/usr/local/etc/kamailio/kamailio-pcscf.cfg I am getting errors. Please find
the attached log file for the same.
"0(1786) ERROR: db_mysql [km_my_con.c:124]: db_mysql_new_connection():
driver error: Access denied for user 'pcscf'@'pcscf.net1.test' (using
password: YES)
0(1786) ERROR: <core> [db.c:318]: db_do_init2(): could not add connection
to the pool 0(1786) ERROR: ims_usrloc_pcscf [usrloc_db.c:79]: init_db():
unable to connect to the database
0(1786) ERROR: ims_usrloc_pcscf [ul_mod.c:203]: mod_init(): Error
initializing db connection"
I am doubting about my Zone files. Could you please check zone file once.
Please find the attached zone files.
Thank you so much in advance
Regards,
-kranti
Hi,
I'm making some tests with pipelimit module and when changing the time
interval the limit gets changed in a way that it's multiplied by the time
interval. For example if I use a time interval of 1 second and a limit of
20 (if (!pl_check("$si", "TAILDROP", "20"))) the module start limiting
right after the traffic gets over 20 CPS. But if I change the time interval
to 3 seconds, the module starts limiting the traffic right after 60 CPS.
This is my configuration:
# ----- pipelimit params-----
modparam("pipelimit", "timer_interval", 3)
modparam("pipelimit", "hash_size", 10)
modparam("pipelimit", "db_url", DBURL)
modparam("pipelimit", "reply_code", 503)
modparam("pipelimit", "reply_reason", "Limiting")
...
...
...
request_route {
...
...
if(is_method("INVITE")) {
$var(limit) = 20;
if (!pl_check("$si", "TAILDROP", "$var(limit)")) {
xlog("L_INFO", "[$ci] $si - Limiting INVITE using pipe
$var(limit) req/sec\n");
pl_drop();
exit;
}
.....
.....
.....
}
}
Checking the source for pipelimit module (
https://github.com/kamailio/kamailio/blob/master/src/modules/pipelimit/pipe…)
I see that for taildrop it's checking for the limit times the time_interval:
case PIPE_ALGO_TAILDROP:
ret = (pipe->counter <= pipe->limit * timer_interval) ? 1 : -1;
break;
I've made a change eliminating the time_interval (set it to 1) from that
check and after that I've got the limit working OK, and the traffic gets
drop right after it's over the limit (20 cps) using any time_interval. Is
there some issue with the timer for the check not being updated by the
module settings (timer_interval)? I'm using kamailio 4.4 and I've also
tested it in kamailio 4.3 and 5.1 with same results.
Thanks in advance,
Juan Priotti
Hi,
Running bleeding-edge branch 5.1 clone here.
dmq_usrloc replication works fine when using in-memory only backing for
the underlying usrloc module, i.e. db_mode 0. I haven't tried mode 1 and
mode 2.
I use mode 3, so that contacts are immediately persisted straight to a
local database. The database flavour is PostgreSQL in this case.
When new contacts replicated via dmq_usrloc come in, I get this in the
Kamailio log:
Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: <core> [db.c:465]: db_use_table(): invalid parameter value
Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: usrloc [udomain.c:817]: db_load_urecord_by_ruid(): failed to use table location
Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: WARNING: dmq_usrloc [usrloc_sync.c:147]: delete_contact(): AOR/Contact not found
Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: <core> [db.c:465]: db_use_table(): invalid parameter value
Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: usrloc [udomain.c:817]: db_load_urecord_by_ruid(): failed to use table location
Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: WARNING: dmq_usrloc [usrloc_sync.c:147]: delete_contact(): AOR/Contact not found
I added some code to lib/srdb1/db.c to print the parameter name and the
location being passed to db_use_table():
*/
int db_use_table(db1_con_t* _h, const str* _t)
{
+ LM_ERR("DB handle = %p\n", _h);
+
if (!_h || !_t || !_t->s) {
- LM_ERR("invalid parameter value\n");
+ LM_ERR("invalid parameter value %.*s\n", _t->len, _t->s);
return -1;
}
And got this:
Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: <core> [db.c:462]: db_use_table(): DB handle = (nil)
Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: <core> [db.c:465]: db_use_table(): invalid parameter value location
Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: usrloc [udomain.c:631]: db_load_urecord(): failed to use table location
Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: <core> [db.c:462]: db_use_table(): DB handle = (nil)
Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: <core> [db.c:465]: db_use_table(): invalid parameter value location
Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: usrloc [ucontact.c:679]: db_insert_ucontact(): sql use_table failed
Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]: ERROR: usrloc [urecord.c:582]: insert_ucontact(): failed to insert in database
So, it appears the DB handle being passed here is NULL is in this
situation.
The same AOR is present in 'ul.dump' RPC command when using db_mode 0.
Please advise? :)
-- Alex
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Hello,
Kamailio SIP Server v5.0.5 stable release is out.
This is a maintenance release of the previous stable branch, 5.0, that
includes fixes since the release of v5.0.4. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v5.0.x. Deployments running previous v5.0.x
versions are strongly recommended to be upgraded to v5.0.5 or v5.1.0.
For more details about version 5.0.5 (including links and guidelines to
download the tarball or from GIT repository), visit:
* https://www.kamailio.org/w/2017/12/kamailio-v5-0-5-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Note: the latest stable branch is 5.1, at this moment with its latest
release v5.1.0. See more details about it at:
* https://www.kamailio.org/w/kamailio-v5-1-0-release-notes/
Many thanks to all contributing and using Kamailio!
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
Hello,
I am considering to release in the near future a new version from branch
5.0, respectively v5.0.5, a candidate day being next week, on Tuesday,
December 19, 2017.
If you are aware of any issue in branch 5.0 which is not yet reported on
github.com/kamailio/kamailio issues tracker, then do it as soon as
possible to have a chance to look at it.
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
>
> Hello Everyone,
>
We are using only modifying Kamailio configuration files (In IMS
application), to tune to our application, without modifying any underlying
software.
Does configuration script files comes under GPL License?
regards
GS Kumar
Hello Everyone,
Can someone kindly answer my query below, i am stuck up badly.
regards
GS Kumar
On Wed, Dec 13, 2017 at 12:47 PM, Seshu Kumar <gskumar12345(a)gmail.com>
wrote:
> Hello Everyone,
>
> We are using Kamailio IMS (version 5.0.4). We are using Jitsi for making
> calls.
> Our SIP clients are behind NATed network.
> When clients and P-Server is configured to UDP mode, we are able to make
> calls sucessfully.
> When clients and P-Server is configured to TCP mode, call is not getting
> through.
>
> From logs I found that ACK is not being sent from P-Server to Client.
>
> On googling i found that this is known problem.
>
>
> Can anyone kindly clarify whether this problem is resolved?
> Is there is work around.
> Am i not setting any parameter properly?
> Let us know if further information is needed.
>
> Kindly some answer, we are newbies... :)
>
> Regards
> GS Kumar
>
Upgraded two installs to 5.1.
* Same cfg file from 5.0
* No issues with install 1
Install 2 results in:
ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <geoip2> found
CRITICAL: <core> [core/cfg.y:3450]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 343, column 71: Can't set module parameter
ERROR: <core> [core/sr_module.c:582]: load_module(): could not open module </usr/local/lib64/kamailio/modules/geoip2.so>: libmaxminddb.so.0: cannot open shared object file: No such file or directory
CRITICAL: <core> [core/cfg.y:3447]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 122, column 12-22: failed to load module
WARNING: <core> [core/ppcfg.c:221]: pp_ifdef_level_check(): different number of preprocessor directives: N(#!IF[N]DEF) - N(#!ENDIF) = 1
ls -l /usr/local/lib64/kamailio/modules/ | grep geo
-rwxr-xr-x 1 root root 73800 Dec 14 12:44 geoip2.so
If I copy cfg file from install 2 to install 1, no issues with install 1.
Any idea what could be going wrong?
- dan
Hi all,
We were using kamailio 4.4.5 and we enabled only for webrtc.
We were observing two memory crashed in last two weeks.
Oct 10 01:03:03 webrtc /usr/sbin/kamailio[18002]: ERROR: <core>
[tcp_read.c:1321]: tcp_read_req(): ERROR: tcp_read_req: error reading - c:
0x7f21ea8f6198 r: 0x7f21ea8f6218
Oct 10 01:03:04 webrtc /usr/sbin/kamailio[18003]: ERROR: tls
[tls_server.c:190]: tls_complete_init(): tls: ssl bug #1491 workaround: not
enough memory for safe operation: shm=9926856 threshold1=9961472
Oct 10 01:03:04 webrtc /usr/sbin/kamailio[18003]: ERROR: <core>
[tcp_read.c:1321]: tcp_read_req(): ERROR: tcp_read_req: error reading - c:
0x7f21ea8f6198 r: 0x7f21ea8f6218
Oct 10 01:03:05 webrtc /usr/sbin/kamailio[18004]: ERROR: tls
[tls_server.c:190]: tls_complete_init(): tls: ssl bug #1491 workaround: not
enough memory for safe operation: shm=9926856 threshold1=9961472
Oct 10 01:03:05 webrtc /usr/sbin/kamailio[18004]: ERROR: <core>
[tcp_read.c:1321]: tcp_read_req(): ERROR: tcp_read_req: error reading - c:
0x7f21ea8f6198 r: 0x7f21ea8f6218
Is there any known issue for tls module in kamailio_4.4.5 ?. We are using
default 64MB for shared memory and 8MB for private memory. Do we need to
increase this ?.
Regards
Andrew