[Libwebsockets] Timeout on client connect

Andy Green andy at warmcat.com
Wed Nov 16 09:05:52 CET 2016



On November 16, 2016 3:40:21 PM GMT+08:00, techi eth <techieth at gmail.com> wrote:
>I am facing one issue when websocket client trying to connect to server
>is
>timed out.
>I try to ping server & that is pining well.It will make sure network
>connectivity is ON.
>From below log can you get me more info why this can happen
>
>[2016/11/16 07:17:52:8663] NOTICE: wsi 0xb41e0d00: TIMEDOUT WAITING on
>2
>(did hdr 0, ah 0x5c7a68, wl 0, pfd events 5)

Timeout reason 2 == PENDING_TIMEOUT_AWAITING_CONNECT_RESPONSE

https://github.com/warmcat/libwebsockets/blob/master/lib/libwebsockets.h#L3107

It doesn't feel it got a response to its connection attempt.

Check what is actually happening on the wire with tcpdump.

Note that if you use ping to touch a server, that tells you there is a route, the remote kernel is up and the transport can pass icmp.  It doesn't tell you squat about the state of any given service on a particular port.

-Andy

>[2016/11/16 07:17:52:8767] NOTICE: lws_header_table_detach: wsi
>0xb41e0d00:
>ah held 60s, ah.rxpos 0, ah.rxlen 0, mode/state 34
>4,wsi->more_rx_waiting 0
>
>[2016/11/16 07:18:53:0348] NOTICE: wsi 0xb41df798: TIMEDOUT WAITING on
>2
>(did hdr 0, ah 0x5c5e20, wl 0, pfd events 5)
>
>[2016/11/16 07:18:53:0939] NOTICE: lws_header_table_detach: wsi
>0xb41df798:
>ah held 61s, ah.rxpos 0, ah.rxlen 0, mode/state 34
>4,wsi->more_rx_waiting 0
>
>[2016/11/16 07:18:53:0943] NOTICE: wsi 0xb41bc1b0: TIMEDOUT WAITING on
>2
>(did hdr 0, ah 0x5c6c44, wl 0, pfd events 5)
>
>[2016/11/16 07:18:53:1015] NOTICE: lws_header_table_detach: wsi
>0xb41bc1b0:
>ah held 61s, ah.rxpos 0, ah.rxlen 0, mode/state 34
>4,wsi->more_rx_waiting 0
>
>[2016/11/16 07:19:53:1636] NOTICE: wsi 0xb41e0d00: TIMEDOUT WAITING on
>2
>(did hdr 0, ah 0x5c888c, wl 0, pfd events 5)
>
>[2016/11/16 07:19:53:2245] NOTICE: lws_header_table_detach: wsi
>0xb41e0d00:
>ah held 61s, ah.rxpos 0, ah.rxlen 0, mode/state 34
>4,wsi->more_rx_waiting 0
>
>[2016/11/16 07:19:53:2248] NOTICE: wsi 0xb41e0a18: TIMEDOUT WAITING on
>2
>(did hdr 0, ah 0x5c7a68, wl 0, pfd events 5)
>
>[2016/11/16 07:19:53:2340] NOTICE: lws_header_table_detach: wsi
>0xb41e0a18:
>ah held 61s, ah.rxpos 0, ah.rxlen 0, mode/state 34
>4,wsi->more_rx_waiting 0
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org
>http://libwebsockets.org/mailman/listinfo/libwebsockets




More information about the Libwebsockets mailing list