[SR-Users] websocket sometimes log errors after ws connect has closed

Vasiliy Ganchev vasiliy.ganchev at wildix.com
Fri Dec 18 12:57:24 CET 2015


Hi list!

firstly, the described below issue is harmless to us, and is just little bit
annoying, but analysing the nature of issue decided to share the results,
and hear the opinion of community.

Scenario:
- WebRTC client connected to Kamailio's websocket
- after some time I close tab with WebRTC, in browser.
- using "kamctl fifo ws.dump" and "netstat -npa |grep kama |grep tcp" I can
see that the connection is closed
- but Kamailio still triing to send keepalive to that connection, and in
syslog I got errors:
Dec 18 12:28:18 /usr/sbin/kamailio[4471]: WARNING: websocket
[ws_frame.c:245]: encode_and_send_ws_frame(): TCP/TLS connection get failed
Dec 18 12:28:18 /usr/sbin/kamailio[4471]: ERROR: websocket [ws_frame.c:797]:
ping_pong(): sending keepalive

Analysing sources, and using debug level 3 I see such logs (after the webrtc
client is closed, and )
Dec 18 12:33:33 /usr/sbin/kamailio[4471]: ERROR: websocket [ws_conn.c:468]:
wsconn_get_list(): counter wsc [0xb1acb270] prev => [(nil)] next => [(nil)]
Dec 18 12:33:33 /usr/sbin/kamailio[4471]: ERROR: websocket [ws_conn.c:495]:
wsconn_get_list(): wsc [0xb1acb270] id [2] ref++
Dec 18 12:33:33 /usr/sbin/kamailio[4471]: ERROR: websocket [ws_conn.c:504]:
wsconn_get_list(): wsconn_get_list returns list [0xb666f410] with [1]
members


What is strange: in some tests, after unsuccessful sending of Ping,
kamailio's "wsconn_get_list"  clean up that connection, but in some tests,
kamailio try sending Ping to old connection during 5-10 minutes (this time
is not constant from test to test)
Suddenly my current knowledge of C is not enough to find out were is the
problem's root.



General question is: is this correct list for such issuing? Or it should be
in Dev list?

once again - the problem is harmful (afetr some time, kamailio stop trying
sending ping to inactive connection, but it is annoying to see errors in
logs)
Cheers!



--
View this message in context: http://sip-router.1086192.n5.nabble.com/websocket-sometimes-log-errors-after-ws-connect-has-closed-tp144092.html
Sent from the Users mailing list archive at Nabble.com.



More information about the sr-users mailing list