[OpenSIPS-Users] Tls using t_relay

Tito Cumpen tito at xsvoce.com
Tue Apr 21 23:22:27 EST 2020


Bogdan,

I found out that there was a timer flag for tcp connections that may have
been causing an issue
tcp_connect_timeout=3
Once I removed this line the tls connection was made fine but now I am
seeing opensips send an error message to the client

SIP/2.0 500 Server error occurred (1/SL)
client---opensips---SIP AS
even though the SIP AS sent a 180 response


Here are the errors from the log

Apr 21 23:12:46 sip1 /sbin/opensips[11376]:
ERROR:core:tcp_connect_blocking_timeout: poll error: flags 28 - 4 8 16 32
Apr 21 23:12:46 sip1 /sbin/opensips[11376]:
ERROR:core:tcp_connect_blocking_timeout: failed to retrieve SO_ERROR
[server=127.0.0.1:443] (111) Connection refused
Apr 21 23:12:46 sip1 /sbin/opensips[11376]:
ERROR:proto_tls:tls_sync_connect: tcp_blocking_connect failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:proto_tls:proto_tls_send:
connect failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:msg_send: send() to
127.0.0.1:443 for proto tls/3 failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:t_forward_nonack:
sending request failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]:
ERROR:core:tcp_connect_blocking_timeout: poll error: flags 28 - 4 8 16 32
Apr 21 23:12:46 sip1 /sbin/opensips[11376]:
ERROR:core:tcp_connect_blocking_timeout: failed to retrieve SO_ERROR
[server=127.0.0.1:443] (111) Connection refused
Apr 21 23:12:46 sip1 /sbin/opensips[11376]:
ERROR:proto_tls:tls_sync_connect: tcp_blocking_connect failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:proto_tls:proto_tls_send:
connect failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:msg_send: send() to
127.0.0.1:443 for proto tls/3 failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:t_forward_nonack:
sending request failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]:
ERROR:core:tcpconn_async_connect: poll error: flags 1c
Apr 21 23:12:46 sip1 /sbin/opensips[11376]:
ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR [server=
127.0.0.1:5060] (111) Connection refused
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:proto_tcp_send:
async TCP connect failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:msg_send: send() to
127.0.0.1:5060 for proto tcp/2 failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:t_forward_nonack:
sending request failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]:
ERROR:core:tcpconn_async_connect: poll error: flags 1c
Apr 21 23:12:46 sip1 /sbin/opensips[11376]:
ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR [server=
127.0.0.1:5060] (111) Connection refused
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:proto_tcp_send:
async TCP connect failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:msg_send: send() to
127.0.0.1:5060 for proto tcp/2 failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:t_forward_nonack:
sending request failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]:
ERROR:core:tcpconn_async_connect: poll error: flags 1c
Apr 21 23:12:46 sip1 /sbin/opensips[11376]:
ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR [server=
127.0.0.1:5223] (111) Connection refused
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:proto_tcp_send:
async TCP connect failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:msg_send: send() to
127.0.0.1:5223 for proto tcp/2 failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:t_forward_nonack:
sending request failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]:
ERROR:core:tcpconn_async_connect: poll error: flags 1c
Apr 21 23:12:46 sip1 /sbin/opensips[11376]:
ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR [server=
127.0.0.1:5223] (111) Connection refused
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:core:proto_tcp_send:
async TCP connect failed
Apr 21 23:12:46 sip1 /sbin/opensips[11376]: ERROR:tm:msg_send: send() to
127.0.0.1:5223 for proto tcp/2 failed

On Tue, Apr 21, 2020 at 11:26 AM Tito Cumpen <tito at xsvoce.com> wrote:

> Hey Bogdan,
>
> Here is the capture I took from using t_relay("tls:domain:port")
>
> As you can see the client side (opensips) does not proceed with allowing
> the socket to open.
>
> Thanks,
> Tito
>
> On Tue, Apr 21, 2020 at 2:18 AM Bogdan-Andrei Iancu <bogdan at opensips.org>
> wrote:
>
>> Hi Tito,
>>
>> Well, from OpenSIPS perceptive it is a "Connection refused", so the
>> destination is rejecting the connect.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>>
>> On 4/20/20 11:49 PM, Tito Cumpen wrote:
>>
>> Yes,
>>
>> It closes the socket right after the syn+ack. I can provide the trace if
>> necessary.Here is an output of the logs
>>
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:proto_tls:proto_tls_send: connect failed
>> 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
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:t_forward_nonack:
>> sending request failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> WARNING:rabbitmq:amqp_check_status: [ID1] socket error: Connection reset by
>> peer(104)
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:rabbitmq:rmq_error:
>> closing channel: a socket error occurred
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:rabbitmq:rmq_error:
>> closing connection: a socket error occurred
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: should be removing pw
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: new branch at
>> sip:support.test at test.org within logic per branch route
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:core:tcp_connect_blocking_timeout: poll error: flags 28 - 4 8 16 32
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:core:tcp_connect_blocking_timeout: failed to retrieve SO_ERROR
>> [server=127.0.0.1:443] (111) Connection refused
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:proto_tls:tls_sync_connect: tcp_blocking_connect failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:proto_tls:proto_tls_send: connect failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:msg_send: send() to
>> 127.0.0.1:443 for proto tls/3 failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:t_forward_nonack:
>> sending request failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:core:tcp_connect_blocking_timeout: poll error: flags 28 - 4 8 16 32
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:core:tcp_connect_blocking_timeout: failed to retrieve SO_ERROR
>> [server=127.0.0.1:443] (111) Connection refused
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:proto_tls:tls_sync_connect: tcp_blocking_connect failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:proto_tls:proto_tls_send: connect failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:msg_send: send() to
>> 127.0.0.1:443 for proto tls/3 failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:t_forward_nonack:
>> sending request failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:core:tcpconn_async_connect: poll error: flags 1c
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR [server=
>> 127.0.0.1:5060] (111) Connection refused
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:core:proto_tcp_send:
>> async TCP connect failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:msg_send: send() to
>> 127.0.0.1:5060 for proto tcp/2 failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:t_forward_nonack:
>> sending request failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:core:tcpconn_async_connect: poll error: flags 1c
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR [server=
>> 127.0.0.1:5060] (111) Connection refused
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:core:proto_tcp_send:
>> async TCP connect failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:msg_send: send() to
>> 127.0.0.1:5060 for proto tcp/2 failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:t_forward_nonack:
>> sending request failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:core:tcpconn_async_connect: poll error: flags 1c
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR [server=
>> 127.0.0.1:5223] (111) Connection refused
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:core:proto_tcp_send:
>> async TCP connect failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:msg_send: send() to
>> 127.0.0.1:5223 for proto tcp/2 failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]: ERROR:tm:t_forward_nonack:
>> sending request failed
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:core:tcpconn_async_connect: poll error: flags 1c
>> Apr 20 20:41:53 sip1 /sbin/opensips[5106]:
>> ERROR:core:tcpconn_async_connect: failed to retrieve SO_ERROR [server=
>> 127.0.0.1:5223] (111) Connection refused
>>
>> Thanks,
>> Tito
>>
>> On Mon, Apr 20, 2020 at 7:32 AM Bogdan-Andrei Iancu <bogdan at opensips.org>
>> wrote:
>>
>>> Hi Tito,
>>>
>>> You say OpenSIPS is sending a RESET without being any data exchanged on
>>> the connection?
>>>
>>> What are the logs for the failed send ?
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>>
>>> OpenSIPS Founder and Developer
>>>   https://www.opensips-solutions.com
>>>
>>> On 4/17/20 11:43 PM, Tito Cumpen wrote:
>>>
>>> Hello,
>>>
>>> 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.
>>>
>>> Are there any other configs to be considered when attempting this ?
>>>
>>> _______________________________________________
>>> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200421/e3d562f3/attachment.html>


More information about the Users mailing list