<p></p>
<h3 dir="auto">Description</h3>
<p dir="auto">during sipp "tls caller and tls callee" test, do tls.reload repeatedly, the sipp tls connection will be disconnected and tls.reload will report error and can not be recovered</p>
<h3 dir="auto">Troubleshooting</h3>
<h4 dir="auto">Reproduction</h4>
<p dir="auto">(1)write a simple request_route logic in kamailio.cfg, as follows:<br>
request_route {<br>
add_local_rport();<br>
$du = "sip:192.168.131.190:1001;transport=tls";<br>
forward();<br>
}<br>
(2)start sipp caller to kamailio tls:0.0.0.0:5061 and kamailio will relay this request to callee<br>
(3)at the same time, in another console, run the following cmds:<br>
((i = 0)); while true; do /opt/kamailio/sbin/kamcmd tls.reload && echo $i && ((i = i+1)); done;</p>
<h4 dir="auto">Debugging Data</h4>
<p dir="auto">None</p>
<h4 dir="auto">Log Messages</h4>
<p dir="auto">tls.reload will report the following error, and it can not work again until kamailio is restarted:<br>
error: 500 - Error while loading TLS configuration file (consult server log)</p>
<h2 dir="auto">at the same time, sipp tls connection is disconnected by kamailio, some error is shown in the kamailo.log:</h2>
<h2 dir="auto">Dec 14 10:59:54 localhost sipproxy[64723]: ERROR: tls [tls_server.c:1330]: tls_h_read_f(): protocol level error<br>
Dec 14 10:59:54 localhost sipproxy[64723]: ERROR: tls [tls_server.c:1334]: tls_h_read_f(): src addr: 192.168.131.190:59545<br>
Dec 14 10:59:54 localhost sipproxy[64723]: ERROR: tls [tls_server.c:1337]: tls_h_read_f(): dst addr: 192.168.131.190:5061<br>
Dec 14 10:59:54 localhost sipproxy[64723]: ERROR: [core/tcp_read.c:1478]: tcp_read_req(): ERROR: tcp_read_req: error reading - c: 0x7f3f67c89ba8 r: 0x7f3f67c89cd0 (-1)</h2>
<h4 dir="auto">SIP Traffic</h4>
<pre class="notranslate"><code class="notranslate"></code></pre>
<h3 dir="auto">Possible Solutions</h3>
<h3 dir="auto">Additional Information</h3>
<ul dir="auto">
<li><strong>Kamailio Version</strong> - output of <code class="notranslate">kamailio -v</code></li>
</ul>
<pre class="notranslate"><code class="notranslate">version: kamailio 5.6.2 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, 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_BLOCKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_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.
id: unknown
compiled on 10:03:56 Dec 14 2022 with gcc 4.9.4
</code></pre>
<ul dir="auto">
<li><strong>Operating System</strong>:</li>
</ul>
<pre class="notranslate"><code class="notranslate">Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/3305">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZMDGAORFQBEKKAUWEDWNE3LLANCNFSM6AAAAAAS553LGQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZO34IYCZQWGV4QZ26LWNE3LLA5CNFSM6AAAAAAS553LGSWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHFSJC65I.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/issues/3305</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/3305",
"url": "https://github.com/kamailio/kamailio/issues/3305",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>