Hi !., Kamailio websocket state is going into FINWAIT1 without sending FIN message out when we do service kamailio restart. I have a Primary and Secondary node configured. When I perform switchover socket status is going into FINWAIT1 state without sending FIN to the client hence client status is showing established, This is happening 90+% of times but does work sometimes.
AT Kamailio:
[root@localhost ~]# netstat -tunelap | grep 41034
tcp 0 1 172.27.45.198:9040 172.27.6.98:41034 FIN_WAIT1 0 0 -
[root@localhost ~]#
AT Nginx (client):
root@meet:~# netstat -tunelap | grep 9040
tcp 0 0 172.27.6.98:41034 172.27.45.198:9040 ESTABLISHED 33 763106 1322/nginx: worker
root@meet:~#
Thanks,
Shahid
Hello,
just to understand it correctly: You are restarting the Kamailio on the active node, and it does not close the existing Websocket TCP connections? Or you are restarting the Kamailio on the second passive node?
Cheers,
Henning
From: sr-dev sr-dev-bounces@lists.kamailio.org On Behalf Of Shahid Hussain Sent: Thursday, June 17, 2021 1:54 PM To: sr-dev@lists.kamailio.org Subject: [sr-dev] Kamailio websocket state FINWAIT1 after switchover
Hi !., Kamailio websocket state is going into FINWAIT1 without sending FIN message out when we do service kamailio restart. I have a Primary and Secondary node configured. When I perform switchover socket status is going into FINWAIT1 state without sending FIN to the client hence client status is showing established, This is happening 90+% of times but does work sometimes.
AT Kamailio: [root@localhost ~]# netstat -tunelap | grep 41034 tcp 0 1 172.27.45.198:9040http://172.27.45.198:9040 172.27.6.98http://172.27.6.98:41034 FIN_WAIT1 0 0 - [root@localhost ~]#
AT Nginx (client): root@meet:~# netstat -tunelap | grep 9040 tcp 0 0 172.27.6.98http://172.27.6.98:41034 172.27.45.198:9040http://172.27.45.198:9040 ESTABLISHED 33 763106 1322/nginx: worker root@meet:~#
Thanks, Shahid
Hi Henning, I missed your reply as it went to another folder!. Yes, I am restarting an active node and it is not closing the websocket tcp connection but the state of connection is FINWAIT. Capture shows neither at active node nor end point received any FIN packet. The reason we suspect that switchover is moving VIP to the current passive node so fast that the active node is unable to complete tcp close activity. We have implemented ping pong from the client to detect network failure as a resolution.
Thanks.
On Fri, Jun 18, 2021 at 2:54 PM Henning Westerholt hw@skalatan.de wrote:
Hello,
just to understand it correctly: You are restarting the Kamailio on the active node, and it does not close the existing Websocket TCP connections? Or you are restarting the Kamailio on the second passive node?
Cheers,
Henning
*From:* sr-dev sr-dev-bounces@lists.kamailio.org *On Behalf Of *Shahid Hussain *Sent:* Thursday, June 17, 2021 1:54 PM *To:* sr-dev@lists.kamailio.org *Subject:* [sr-dev] Kamailio websocket state FINWAIT1 after switchover
Hi !.,
Kamailio websocket state is going into FINWAIT1 without sending FIN message out when we do service kamailio restart.
I have a Primary and Secondary node configured. When I perform switchover socket status is going into FINWAIT1 state without sending FIN to the client hence client status is showing established, This is happening 90+% of times but does work sometimes.
AT Kamailio:
[root@localhost ~]# netstat -tunelap | grep 41034
tcp 0 1 172.27.45.198:9040 172.27.6.98:41034 FIN_WAIT1 0 0 -
[root@localhost ~]#
AT Nginx (client):
root@meet:~# netstat -tunelap | grep 9040
tcp 0 0 172.27.6.98:41034 172.27.45.198:9040 ESTABLISHED 33 763106 1322/nginx: worker
root@meet:~#
Thanks,
Shahid