<div dir="ltr">Bogdan,<div><br></div><div>I found out that there was a timer flag for tcp connections that may have been causing an issue</div><div>tcp_connect_timeout=3<br></div><div>Once I removed this line the tls connection was made fine but now I am seeing opensips send an error message to the client</div><div><br></div><div>SIP/2.0 500 Server error occurred (1/SL)<br></div><div>client---opensips---SIP AS</div><div>even though the SIP AS sent a 180 response</div><div><br></div><div><br></div><div>Here are the errors from the log</div><div><br></div><div>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:tcp_connect_blocking_timeout: poll error: flags 28 - 4 8 16 32<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:tcp_connect_blocking_timeout: failed to retrieve SO_ERROR [server=<a href="http://127.0.0.1:443">127.0.0.1:443</a>] (111) Connection refused<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:proto_tls:tls_sync_connect: tcp_blocking_connect failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:proto_tls:proto_tls_send: connect failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:msg_send: send() to <a href="http://127.0.0.1:443">127.0.0.1:443</a> for proto tls/3 failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:t_forward_nonack: sending request failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:tcp_connect_blocking_timeout: poll error: flags 28 - 4 8 16 32<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:tcp_connect_blocking_timeout: failed to retrieve SO_ERROR [server=<a href="http://127.0.0.1:443">127.0.0.1:443</a>] (111) Connection refused<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:proto_tls:tls_sync_connect: tcp_blocking_connect failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:proto_tls:proto_tls_send: connect failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:msg_send: send() to <a href="http://127.0.0.1:443">127.0.0.1:443</a> for proto tls/3 failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:t_forward_nonack: sending request failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:tcpconn_async_connect: poll error: flags 1c<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR [server=<a href="http://127.0.0.1:5060">127.0.0.1:5060</a>] (111) Connection refused<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:proto_tcp_send: async TCP connect failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:msg_send: send() to <a href="http://127.0.0.1:5060">127.0.0.1:5060</a> for proto tcp/2 failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:t_forward_nonack: sending request failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:tcpconn_async_connect: poll error: flags 1c<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR [server=<a href="http://127.0.0.1:5060">127.0.0.1:5060</a>] (111) Connection refused<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:proto_tcp_send: async TCP connect failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:msg_send: send() to <a href="http://127.0.0.1:5060">127.0.0.1:5060</a> for proto tcp/2 failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:t_forward_nonack: sending request failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:tcpconn_async_connect: poll error: flags 1c<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR [server=<a href="http://127.0.0.1:5223">127.0.0.1:5223</a>] (111) Connection refused<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:proto_tcp_send: async TCP connect failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:msg_send: send() to <a href="http://127.0.0.1:5223">127.0.0.1:5223</a> for proto tcp/2 failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:t_forward_nonack: sending request failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:tcpconn_async_connect: poll error: flags 1c<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR [server=<a href="http://127.0.0.1:5223">127.0.0.1:5223</a>] (111) Connection refused<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:proto_tcp_send: async TCP connect failed<br>Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:msg_send: send() to <a href="http://127.0.0.1:5223">127.0.0.1:5223</a> for proto tcp/2 failed<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 21, 2020 at 11:26 AM Tito Cumpen <<a href="mailto:tito@xsvoce.com">tito@xsvoce.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hey Bogdan,<div><br></div><div>Here is the capture I took from using t_relay("tls:domain:port") </div><div><br></div><div>As you can see the client side (opensips) does not proceed with allowing the socket to open.</div><div><br></div><div>Thanks,</div><div>Tito</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 21, 2020 at 2:18 AM Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<tt>Hi Tito,<br>
<br>
Well, from OpenSIPS perceptive it is a "Connection refused", so
the destination is rejecting the connect.<br>
<br>
Regards,<br>
</tt>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="https://www.opensips-solutions.com" target="_blank">https://www.opensips-solutions.com</a>
</pre>
<div>On 4/20/20 11:49 PM, Tito Cumpen wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Yes,
<div><br>
</div>
<div>It closes the socket right after the syn+ack. I can provide
the trace if necessary.Here is an output of the logs</div>
<div><br>
</div>
<div>Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:proto_tls:proto_tls_send: connect failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:msg_send:
send() to 192.xx.xx.xxx:5081 for proto tls/3 failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:tm:t_forward_nonack: sending request failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
WARNING:rabbitmq:amqp_check_status: [ID1] socket error:
Connection reset by peer(104)<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:rabbitmq:rmq_error: closing channel: a socket error
occurred<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:rabbitmq:rmq_error: closing connection: a socket error
occurred<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]: should be removing
pw<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]: new branch at <a href="mailto:sip%3Asupport.test@test.org" target="_blank">sip:support.test@test.org</a> within
logic per branch route<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:tcp_connect_blocking_timeout: poll error: flags 28
- 4 8 16 32<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:tcp_connect_blocking_timeout: failed to retrieve
SO_ERROR [server=<a href="http://127.0.0.1:443" target="_blank">127.0.0.1:443</a>] (111) Connection
refused<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:proto_tls:tls_sync_connect: tcp_blocking_connect failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:proto_tls:proto_tls_send: connect failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:msg_send:
send() to <a href="http://127.0.0.1:443" target="_blank">127.0.0.1:443</a> for proto tls/3
failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:tm:t_forward_nonack: sending request failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:tcp_connect_blocking_timeout: poll error: flags 28
- 4 8 16 32<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:tcp_connect_blocking_timeout: failed to retrieve
SO_ERROR [server=<a href="http://127.0.0.1:443" target="_blank">127.0.0.1:443</a>] (111) Connection
refused<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:proto_tls:tls_sync_connect: tcp_blocking_connect failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:proto_tls:proto_tls_send: connect failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:msg_send:
send() to <a href="http://127.0.0.1:443" target="_blank">127.0.0.1:443</a> for proto tls/3
failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:tm:t_forward_nonack: sending request failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:tcpconn_async_connect: poll error: flags 1c<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR
[server=<a href="http://127.0.0.1:5060" target="_blank">127.0.0.1:5060</a>]
(111) Connection refused<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:proto_tcp_send: async TCP connect failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:msg_send:
send() to <a href="http://127.0.0.1:5060" target="_blank">127.0.0.1:5060</a> for proto tcp/2
failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:tm:t_forward_nonack: sending request failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:tcpconn_async_connect: poll error: flags 1c<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR
[server=<a href="http://127.0.0.1:5060" target="_blank">127.0.0.1:5060</a>]
(111) Connection refused<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:proto_tcp_send: async TCP connect failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:msg_send:
send() to <a href="http://127.0.0.1:5060" target="_blank">127.0.0.1:5060</a> for proto tcp/2
failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:tm:t_forward_nonack: sending request failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:tcpconn_async_connect: poll error: flags 1c<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR
[server=<a href="http://127.0.0.1:5223" target="_blank">127.0.0.1:5223</a>]
(111) Connection refused<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:proto_tcp_send: async TCP connect failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:msg_send:
send() to <a href="http://127.0.0.1:5223" target="_blank">127.0.0.1:5223</a> for proto tcp/2
failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:tm:t_forward_nonack: sending request failed<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:tcpconn_async_connect: poll error: flags 1c<br>
Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR
[server=<a href="http://127.0.0.1:5223" target="_blank">127.0.0.1:5223</a>]
(111) Connection refused<br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Tito</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Apr 20, 2020 at 7:32
AM Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF"> <tt>Hi Tito,<br>
<br>
You say OpenSIPS is sending a RESET without being any data
exchanged on the connection? <br>
<br>
What are the logs for the failed send ?<br>
<br>
Regards,<br>
</tt>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="https://www.opensips-solutions.com" target="_blank">https://www.opensips-solutions.com</a>
</pre>
<div>On 4/17/20 11:43 PM, Tito Cumpen wrote:<br>
</div>
<blockquote type="cite">
<div dir="auto">Hello,
<div dir="auto"><br>
</div>
<div dir="auto">I am attempting to use
t_relay("tls:domain:port") but I am not having much
success with it on 2.4. opensips sends a syn to the
peer then gets an syn ack and sends a rst . The logs
claim that the send failed but it never opened the
socket entirely and did not send the client hello at
all.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Are there any other configs to be
considered when attempting this ?</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
</blockquote>
<br>
</div>
</blockquote></div>
</blockquote></div>