[OpenSIPS-Users] Tls using t_relay
Tito Cumpen
tito at xsvoce.com
Thu Apr 23 19:48:32 EST 2020
Hey Bogdan,
Yes it seems like it continued down my routing script and tried to send it
locally as well
which is why I saw these
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
when using the t_relay command. The remote end was sending provisionals but
the failure above was causing the internal error.
I've found a solution by using force_send_socket(tls:MY_IP:443); my tls port
and then rewriting the host port to the destination.
rewritehostport("SIPAS:port");
should I be using the exit command after a t_relay to avoid this?
Thanks,
Tito
On Thu, Apr 23, 2020 at 1:39 AM Bogdan-Andrei Iancu <bogdan at opensips.org>
wrote:
> Hi Tito,
>
> Note that the tcp_connect_timeout is in milliseconds, so maybe 3 ms is too
> short for getting back the SYN ACK.
>
> The logs are keep reporting the failed connect. You say the connect is ok,
> the INVITE is sent forward to callee and there is also an 180 response?
> ....and then you get the 500 reply ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
> https://www.opensips-solutions.com
>
> On 4/22/20 2:22 AM, Tito Cumpen wrote:
>
> 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
>>>
>>>
>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200423/0a70595b/attachment-0001.html>
More information about the Users
mailing list