Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to change tls connection_timeout via kamcmd #1639

Closed
arkadiam opened this issue Sep 11, 2018 · 3 comments
Closed

Unable to change tls connection_timeout via kamcmd #1639

arkadiam opened this issue Sep 11, 2018 · 3 comments

Comments

@arkadiam
Copy link

Description

Following tls module documentation I'm trying to change connection_timeout value:

# kamcmd cfg.set_now_int tls connection_timeout 300
error: 400 - Failed to set the variable

Troubleshooting

Log Messages

Sep 11 10:07:32 sip02 /usr/sbin/kamailio[32408]: DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read: new connection (1) on /var/run/kamailio//kamailio_ctl
Sep 11 10:07:32 sip02 /usr/sbin/kamailio[32408]: ERROR: <core> [core/cfg/cfg_ctx.c:386]: cfg_set_now(): ERROR: cfg_set_now(): integer value is out of range
Sep 11 10:07:32 sip02 /usr/sbin/kamailio[32408]: ERROR: <core> [core/cfg/cfg_ctx.c:653]: cfg_set_now(): ERROR: cfg_set_now(): failed to set the variable: tls.connection_timeout
Sep 11 10:07:32 sip02 /usr/sbin/kamailio[32408]: DEBUG: ctl [io_listener.c:495]: handle_stream_read(): handle_stream read: eof on /var/run/kamailio//kamailio_ctl

Possible Solutions

Workaround: restart kamailio instead of trying to change variable of the running instance.

Additional Information

  • Kamailio Version - output of kamailio -v
version: kamailio 5.0.7 (x86_64/linux)                                                                                                                                                     
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 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 with gcc 5.3.1
  • Operating System:
Linux sip02 4.4.0-134-generic #160-Ubuntu SMP Wed Aug 15 14:58:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
@miconda
Copy link
Member

miconda commented Sep 11, 2018

Can you try with the patch referenced above? If all ok, it will be backported to 5.1 and 5.0 branches.

@arkadiam
Copy link
Author

I was able to adjust connection_timeout after applying the patch. Tested version: kamailio 5.0.7+patch.
Thank you for a quick fix!

@miconda
Copy link
Member

miconda commented Sep 11, 2018

Note that the value must be less than tcp connection lifetime, otherwise that is checked first and connection closed.

I will backport to stable branches.

@miconda miconda closed this as completed Sep 11, 2018
miconda added a commit that referenced this issue Sep 12, 2018
miconda added a commit that referenced this issue Apr 3, 2019
- GH #1639

(cherry picked from commit deb2904)
(cherry picked from commit 3c4f242)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants