Hello,
I'm having a strange issue, when Kamailio(?) is closing TLS connection just in the middle of session. Usually I see a sort of timeout ~ 600 secs. But it does not ring a bell for me.
With
strace I've found, that it's actually not Kamailio, but underlying SSL
library is doing this, according to line I've got from strace
[2025-05-16
10:00:30] PID=1337952 FD=0 SYSCALL=close -> [No socket info] Raw:
sendto(3, "<183>May 16 10:00:30 /usr/local/sbin/kamailio[1337952]:
DEBUG: tls [tls_server.c:712]: tls_h_tcpconn_close_f(): Closing SSL
connection 0x7f01a1ab1870\n", 150, MSG_NOSIGNAL, NULL, 0) = 150
As
I don't see any explicit calls of tls_h_tcpconn_close_f in the source
code, I assume it's a callback from the external OpenSSL(?) module.
What
would be the best way to debug why OpenSSL(?) is terminating
connection, cause on Wireshark I just do see usual TCP connection with
keepalives
kamailio -v
version: kamailio 5.8.3 (x86_64/linux) 6f8a04
flags:
USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE,
USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, 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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS
1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE 262144,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.