[OpenSIPS-Users] Is it a kind of TCP keep alive produced by OpenSIPS?

Rodrigo Pimenta Carvalho pimenta at inatel.br
Wed Oct 26 19:15:55 CEST 2016


Hi Răzvan.


Thank you very much.

I'm facing a problem here related to TCP connection teared down during dialogs.

While a peer is not in dialogs, its TCP connection to OpenSIPS keeps online all the time.

However, when such peer enters in a conversation (be part of a dialog), after few minutes there is a EOF received in a socket. After this, OpenSIPS can no more send SIP BYEs to the respective peer. In the log I can see:


Jan 02 01:38:45 colibri-imx6-jfl opensips[21018]: Jan  2 01:38:45 [21027] DBG:core:tcp_read: EOF on 0x74e3d048, FD 24
Jan 02 01:38:45 colibri-imx6-jfl opensips[21018]: Jan  2 01:38:45 [21027] DBG:core:tcp_read_req: EOF received
Jan 02 01:38:45 colibri-imx6-jfl opensips[21018]: Jan  2 01:38:45 [21027] DBG:core:io_watch_del: [TCP_worker] io_watch_del op on index 0 24 (0x1875e8, 24, 0, 0x10,0x3) fd_no=3 called
Jan 02 01:38:45 colibri-imx6-jfl opensips[21018]: Jan  2 01:38:45 [21027] DBG:core:tcpconn_release:  releasing con 0x74e3d048, state -1, fd=-1, id=3
Jan 02 01:38:45 colibri-imx6-jfl opensips[21018]: Jan  2 01:38:45 [21027] DBG:core:tcpconn_release:  extra_data (nil)
Jan 02 01:38:45 colibri-imx6-jfl opensips[21018]: Jan  2 01:38:45 [21029] DBG:core:handle_tcp_worker: reader response= 74e3d048, -1 from 2
Jan 02 01:38:45 colibri-imx6-jfl opensips[21018]: Jan  2 01:38:45 [21029] DBG:core:tcpconn_destroy: destroying connection 0x74e3d048, flags 0006


...

When OpenSIPS try to send a SIP BYE via socket 0x74e3d048 , I can see the log:

Jan 02 01:40:49 colibri-imx6-jfl opensips[21018]: Jan  2 01:40:49 [21026] DBG:core:proto_tcp_send: no open tcp connection found, opening new one, async = 1


I have already used the flag "Pp" in the creation of dialogs, but it didn't take effect. That is, even with "Pp" I'm still getting "EOF" in the TCP socket.


1 - Should the flag "Pp" avoid those EOFs during dialogs?


That flag causes the OpenSIPS to send SIP OPTIONS. The peers are replying with SIP 500.


2- Is a SIP 500 reply enough to OpenSIPS keep the dialog connected?


3 - Does it make sense getting absence of keep alive messages during dialogs?


Any hint will be very helpful!

P.S.: I will check the TCP trace too, looking for keep alives.


Best regards.



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


________________________________
De: users-bounces at lists.opensips.org <users-bounces at lists.opensips.org> em nome de Răzvan Crainea <razvan at opensips.org>
Enviado: quarta-feira, 26 de outubro de 2016 13:08
Para: users at lists.opensips.org
Assunto: Re: [OpenSIPS-Users] Is it a kind of TCP keep alive produced by OpenSIPS?

Hi, Rodrigo!

The logs you are tracing are printed when OpenSIPS receives something from the client, and then immediately responds back. Due to the fact that we don't see any other debug messages, like SIP parsing & stuff, makes me think that it is a CRLF pinging - the client periodically sends a CRLFCRLF TCP message to OpenSIPS, and OpenSIPS responds with a single CRLF. Note that this is different from a TCP keep-alive, where each peer send a 0-length TCP message, without any body. That message doesn't even get to the application layer.
However, tracing the communication between OpenSIPS and the client should confirm the above :).

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com<http://www.opensips-solutions.com>

Home — OpenSIPS Solutions<http://www.opensips-solutions.com/>
www.opensips-solutions.com
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is more than a SIP proxy/router as it includes application-level functionalities.

On 10/26/2016 05:10 PM, Rodrigo Pimenta Carvalho wrote:

Dear OpenSIPS users,


In the OpenSIPS log I see:


Jan 01 19:30:38 colibri-imx6-jfl opensips[3444]: Jan  1 19:30:38 [3451] DBG:core:tcp_read_req: Using the global ( per process ) buff
Jan 01 19:30:38 colibri-imx6-jfl opensips[3444]: Jan  1 19:30:38 [3451] DBG:core:tcp_handle_req: content-length= 0
Jan 01 19:30:38 colibri-imx6-jfl opensips[3444]: Jan  1 19:30:38 [3451] DBG:core:async_tsend_stream: Async successful write from first try on 0x74e13548
Jan 01 19:30:38 colibri-imx6-jfl opensips[3444]: Jan  1 19:30:38 [3451] DBG:core:tcp_read_req: tcp_read_req end

The frequency is 1 time at each 1,5 minute. There is only one client online. I suspect that OpenSIPS uses the socket 0x74e13548 to send messages to such client. The client became online using TCP.

Just to confirm, is this log a result of a TCP keep alive function enabled?

Best regards.





RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979



_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20161026/49d0a219/attachment.htm>


More information about the Users mailing list