<div dir="ltr"><div><div><div><div>Hello Andy,<br><br></div>I use patch and test again, but get HS: ACCEPT missing.<br><br></div>From server side's log: <br>2017-02-09 17:46:07,764 DEBUG [WebSocketRedirect] - WebSocketRedirect: (fa07c9f0-d2ed-4636-83ad-d6f3bee0f452, 00000000-0001-0001-0001-000000000008) -> List(Location: <a href="http://10.70.50.187:8080/msg/fa07c9f0-d2ed-4636-83ad-d6f3bee0f452/00000000-0001-0001-0001-000000000008/ERMXuXQvvTRbOtAF7uPvufMOBWtTQNPErEL36uze">http://10.70.50.187:8080/msg/fa07c9f0-d2ed-4636-83ad-d6f3bee0f452/00000000-0001-0001-0001-000000000008/ERMXuXQvvTRbOtAF7uPvufMOBWtTQNPErEL36uze</a>) <br>2017-02-09 17:46:07,852 WARN  [akka.actor.ActorSystemImpl] - Illegal request, responding with status '400 Bad Request': Illegal request-target: Invalid input '/', expected scheme-char, 'EOI', ':', UPPER_ALPHA, '@', lower-reg-name-char, pct-encoded or userinfo-char (line 1, column 4): msg/fa07c9f0-d2ed-4636-83ad-d6f3bee0f452/00000000-0001-0001-0001-000000000008/ERMXuXQvvTRbOtAF7uPvufMOBWtTQNPErEL36uze<br><br></div><div>It seems sent incorrect uri '/' ?<br><br></div>If I stop client and change ip and port to redirect one then run again, it still can connect to server successfully.<br><br>Any advice or something I can try to print ?<br><br></div><div></div><div>Wayne<br></div><div><div><div><div><div><br>---Failed log---------------------------<wbr>----------------------------<br>[ws_start_service]: websocket service starting ...<br><br>====== ws service info ======<br>host=10.70.50.187<br>port=80<br>path=/msg/fa07c9f0-d2ed-4636-83ad-d6f3bee0f452/00000000-0001-0001-0001-000000000008/ERMXuXQvvTRbOtAF7uPvufMOBWtTQNPErEL36uze<br>==================<br><br>ws_callback: LWS_CALLBACK_PROTOCOL_INIT<br>ws_callback: LWS_CALLBACK_LOCK_POLL<br>ws_callback: LWS_CALLBACK_ADD_POLL_FD<br>ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>ws_callback: LWS_CALLBACK_LOCK_POLL<br>ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_FD<br>ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>ws_callback: LWS_CALLBACK_WSI_CREATE<br>ws_callback: LWS_CALLBACK_LOCK_POLL<br>ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_FD<br>ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>ws_callback: LWS_CALLBACK_GET_THREAD_ID<br>ws_callback: LWS_CALLBACK_LOCK_POLL<br>ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_FD<br>ws_callback: LWS_CALLBACK_GET_THREAD_ID<br>ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>ws_callback: LWS_CALLBACK_LOCK_POLL<br>ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_FD<br>ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>ws_callback: LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER<br>[2017/02/09 17:46:07:2095] NOTICE: Initial logging level 7<br>[2017/02/09 17:46:07:2096] NOTICE: Libwebsockets version: 2.1.0 wayne_huang@aynede-Mac-mini.local-v2.0.0-255-g31c5130<br>[2017/02/09 17:46:07:2096] NOTICE: IPV6 not compiled in<br>[2017/02/09 17:46:07:2096] NOTICE: libev support not compiled in<br>[2017/02/09 17:46:07:2096] NOTICE: libuv support not compiled in<br>[2017/02/09 17:46:07:2097] NOTICE:  Threads: 4 each 2560 fds<br>[2017/02/09 17:46:07:2098] NOTICE:  mem: platform fd map: 81920 bytes<br>[2017/02/09 17:46:07:2098] NOTICE:  Compiled with OpenSSL support<br>[2017/02/09 17:46:07:2098] NOTICE:  SSL disabled: no LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT<br>[2017/02/09 17:46:07:2098] NOTICE: Creating Vhost 'default' port -1, 1 protocols, IPv6 off<br>[2017/02/09 17:46:07:2098] NOTICE:  mem: per-conn:          568 bytes + protocol rx buf<br>[2017/02/09 17:46:07:2098] NOTICE:  canonical_hostname = aynede-Mac-mini.local<br>[2017/02/09 17:46:07:2099] ERR: [lws_client_connect_via_info2] 731 call lws_client_connect_2<br>[2017/02/09 17:46:07:2099] ERR: [lws_client_connect_2][18] enter === <br>[2017/02/09 17:46:07:2099] ERR: [lws_client_connect_2] 28<br>[2017/02/09 17:46:07:2099] ERR: [lws_client_connect_2] 52 not proxy<br>[2017/02/09 17:46:07:2099] ERR: [lws_client_connect_2] 60 socket server_addr4.sin_port=80<br>[2017/02/09 17:46:07:2099] NOTICE: lws_client_connect_2: address 10.70.50.187<br>[2017/02/09 17:46:07:2099] ERR: [lws_client_connect_2] 67 ads=10.70.50.187<br>[2017/02/09 17:46:07:2099] ERR: [lws_client_connect_2] 119<br>[2017/02/09 17:46:07:2108] ERR: [lws_client_connect_2] 173 socket invalid = null<br>[2017/02/09 17:46:07:2108] ERR: [lws_client_connect_2] 185 socket bind again, valid not null !!!<br>[2017/02/09 17:46:07:2119] ERR: [lws_client_connect_2] 193 set wsi->mode = LWSCM_WSCL_WAITING_CONNECT<br>[2017/02/09 17:46:07:2119] ERR: [lws_client_connect_2] 210 past here, we can't simply free the structs as error handling as oom4 does.  We have to run the whole close flow.<br>[2017/02/09 17:46:07:2120] ERR: [lws_client_connect_2] 245 nonblocking connect retry (errno = 36)<br>[2017/02/09 17:46:07:2120] ERR: [lws_client_connect_2] 262 return wsi<br>[2017/02/09 17:46:07:2122] ERR: [lws_service_fd_tsi] 1140 call lws_client_socket_service<br>[2017/02/09 17:46:07:2122] ERR: [lws_client_socket_service] 85 wsi->mode=34<br>[2017/02/09 17:46:07:2122] ERR: [lws_client_socket_service] 89 LWSCM_WSCL_WAITING_CONNECT=34, call lws_client_connect_2<br>[2017/02/09 17:46:07:2122] ERR: we are under PENDING_TIMEOUT_SENT_CLIENT_HANDSHAKE timeout protection set in client-handshake.c<br>[2017/02/09 17:46:07:2122] ERR: [lws_client_connect_2][18] enter === <br>[2017/02/09 17:46:07:2122] ERR: [lws_client_connect_2] 28<br>[2017/02/09 17:46:07:2122] ERR: [lws_client_connect_2] 52 not proxy<br>[2017/02/09 17:46:07:2122] ERR: [lws_client_connect_2] 60 socket server_addr4.sin_port=80<br>[2017/02/09 17:46:07:2123] NOTICE: lws_client_connect_2: address 10.70.50.187<br>[2017/02/09 17:46:07:2123] ERR: [lws_client_connect_2] 67 ads=10.70.50.187<br>[2017/02/09 17:46:07:2123] ERR: [lws_client_connect_2] 119<br>[2017/02/09 17:46:07:2129] ERR: [lws_client_connect_2] 225 socket valid not null<br>[2017/02/09 17:46:07:2129] ERR: [lws_client_connect_2] 272 connected<br>[2017/02/09 17:46:07:2129] ERR: [lws_service_fd_tsi] 1140 call lws_client_socket_service<br>[2017/02/09 17:46:07:2129] ERR: [lws_client_socket_service] 85 wsi->mode=36<br>[2017/02/09 17:46:07:2129] ERR: [lws_client_socket_service] 144 LWSCM_WSCL_ISSUE_HANDSHAKE<br>[2017/02/09 17:46:07:2158] ERR: [lws_service_fd_tsi] 1143 goto handled<br>[2017/02/09 17:46:07:2159] ERR: [lws_service_fd_tsi] 1143 goto handled<br>ws_callback: LWS_CALLBACK_LOCK_POLL<br>ws_callback: LWS_CALLBACK_DEL_POLL_FD<br>ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>ws_callback: LWS_CALLBACK_LOCK_POLL<br>ws_callback: LWS_CALLBACK_ADD_POLL_FD<br>ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>ws_callback: LWS_CALLBACK_WSI_CREATE<br>ws_callback: LWS_CALLBACK_LOCK_POLL<br>ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_FD<br>ws_callback: LWS_CALLBACK_GET_THREAD_ID<br>ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>[2017/02/09 17:46:07:8150] ERR: [lws_service_fd_tsi] 1140 call lws_client_socket_service<br>[2017/02/09 17:46:07:8150] ERR: [lws_client_socket_service] 85 wsi->mode=40<br>ws_callback: LWS_CALLBACK_LOCK_POLL<br>ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_FD<br>ws_callback: LWS_CALLBACK_GET_THREAD_ID<br>ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>ws_callback: LWS_CALLBACK_LOCK_POLL<br>ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_FD<br>ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>ws_callback: LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER<br>[2017/02/09 17:46:07:8150] ERR: [lws_client_socket_service] 247 LWSCM_WSCL_WAITING_SERVER_REPLY<br>[2017/02/09 17:46:07:8153] ERR: [lws_client_socket_service] 315 call lws_client_interpret_server_handshake<br>[2017/02/09 17:46:07:8153] ERR: [lws_client_interpret_server_handshake] 470 http_response=301<br>[2017/02/09 17:46:07:8153] NOTICE: ssl 0 <br>[2017/02/09 17:46:07:8153] ERR: [lws_client_interpret_server_handshake] 485 call lws_client_reset, ads=10.70.50.187, port=8080, path=msg/fa07c9f0-d2ed-4636-83ad-d6f3bee0f452/00000000-0001-0001-0001-000000000008/ERMXuXQvvTRbOtAF7uPvufMOBWtTQNPErEL36uze<br>[2017/02/09 17:46:07:8153] NOTICE: ssl 0 http<br>[2017/02/09 17:46:07:8153] ERR: [lws_client_connect_2] 398 copy to protocol p=ws-protocol<br>[2017/02/09 17:46:07:8153] NOTICE: redirect ads='10.70.50.187', port=8080, path='msg/fa07c9f0-d2ed-4636-83ad-d6f3bee0f452/00000000-0001-0001-0001-000000000008/ERMXuXQvvTRbOtAF7uPvufMOBWtTQNPErEL36uze', ssl = 0<br>[2017/02/09 17:46:07:8154] NOTICE: [lws_client_connect_2] 428 check address=10.70.50.187, path=msg/fa07c9f0-d2ed-4636-83ad-d6f3bee0f452/00000000-0001-0001-0001-000000000008/ERMXuXQvvTRbOtAF7uPvufMOBWtTQNPErEL36uze, host=10.70.50.187<br>[2017/02/09 17:46:07:8154] ERR: [lws_client_connect_2] 433 lws_hdr_simple_create protocol = ws-protocol<br>[2017/02/09 17:46:07:8154] NOTICE: [lws_client_reset] 441 call lws_client_connect_2<br>[2017/02/09 17:46:07:8154] ERR: [lws_client_connect_2][18] enter === <br>[2017/02/09 17:46:07:8154] ERR: [lws_client_connect_2] 28<br>[2017/02/09 17:46:07:8154] ERR: [lws_client_connect_2] 52 not proxy<br>[2017/02/09 17:46:07:8154] ERR: [lws_client_connect_2] 60 socket server_addr4.sin_port=8080<br>[2017/02/09 17:46:07:8154] NOTICE: lws_client_connect_2: address 10.70.50.187<br>[2017/02/09 17:46:07:8154] ERR: [lws_client_connect_2] 67 ads=10.70.50.187<br>[2017/02/09 17:46:07:8154] ERR: [lws_client_connect_2] 119<br>[2017/02/09 17:46:07:8159] ERR: [lws_client_connect_2] 173 socket invalid = null<br>[2017/02/09 17:46:07:8160] ERR: [lws_client_connect_2] 185 socket bind again, valid not null !!!<br>[2017/02/09 17:46:07:8160] ERR: [lws_client_connect_2] 193 set wsi->mode = LWSCM_WSCL_WAITING_CONNECT<br>[2017/02/09 17:46:07:8160] ERR: [lws_client_connect_2] 210 past here, we can't simply free the structs as error handling as oom4 does.  We have to run the whole close flow.<br>[2017/02/09 17:46:07:8160] ERR: [lws_client_connect_2] 245 nonblocking connect retry (errno = 36)<br>[2017/02/09 17:46:07:8161] ERR: [lws_client_connect_2] 262 return wsi<br>[2017/02/09 17:46:07:8161] ERR: [lws_service_fd_tsi] 1143 goto handled<br>[2017/02/09 17:46:07:8162] ERR: [lws_service_fd_tsi] 1140 call lws_client_socket_service<br>[2017/02/09 17:46:07:8162] ERR: [lws_client_socket_service] 85 wsi->mode=34<br>[2017/02/09 17:46:07:8162] ERR: [lws_client_socket_service] 89 LWSCM_WSCL_WAITING_CONNECT=34, call lws_client_connect_2<br>[2017/02/09 17:46:07:8162] ERR: we are under PENDING_TIMEOUT_SENT_CLIENT_HANDSHAKE timeout protection set in client-handshake.c<br>[2017/02/09 17:46:07:8162] ERR: [lws_client_connect_2][18] enter === <br>[2017/02/09 17:46:07:8162] ERR: [lws_client_connect_2] 28<br>[2017/02/09 17:46:07:8162] ERR: [lws_client_connect_2] 52 not proxy<br>[2017/02/09 17:46:07:8162] ERR: [lws_client_connect_2] 60 socket server_addr4.sin_port=8080<br>[2017/02/09 17:46:07:8162] NOTICE: lws_client_connect_2: address 10.70.50.187<br>[2017/02/09 17:46:07:8162] ERR: [lws_client_connect_2] 67 ads=10.70.50.187<br>[2017/02/09 17:46:07:8162] ERR: [lws_client_connect_2] 119<br>[2017/02/09 17:46:07:8167] ERR: [lws_client_connect_2] 225 socket valid not null<br>[2017/02/09 17:46:07:8167] ERR: [lws_client_connect_2] 272 connected<br>[2017/02/09 17:46:07:8167] ERR: [lws_service_fd_tsi] 1140 call lws_client_socket_service<br>[2017/02/09 17:46:07:8167] ERR: [lws_client_socket_service] 85 wsi->mode=36<br>[2017/02/09 17:46:07:8167] ERR: [lws_client_socket_service] 144 LWSCM_WSCL_ISSUE_HANDSHAKE<br>[2017/02/09 17:46:07:8168] ERR: [lws_service_fd_tsi] 1143 goto handled<br>[2017/02/09 17:46:07:8168] ERR: [lws_service_fd_tsi] 1143 goto handled<br>ws_callback: LWS_CALLBACK_CLIENT_CONNECTION_ERROR<br>[ws_callback] Connect with server error: HS: ACCEPT missing<br>[2017/02/09 17:46:07:8548] ERR: [lws_service_fd_tsi] 1140 call lws_client_socket_service<br>ws_callback: LWS_CALLBACK_CLOSED_CLIENT_HTTP<br>ws_callback: LWS_CALLBACK_LOCK_POLL<br>ws_callback: LWS_CALLBACK_DEL_POLL_FD<br>ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>ws_callback: LWS_CALLBACK_WSI_DESTROY<br>ws_callback: LWS_CALLBACK_PROTOCOL_DESTROY<br>[2017/02/09 17:46:07:8548] ERR: [lws_client_socket_service] 85 wsi->mode=40<br>[2017/02/09 17:46:07:8548] ERR: [lws_client_socket_service] 247 LWSCM_WSCL_WAITING_SERVER_REPLY<br>[2017/02/09 17:46:07:8551] ERR: [lws_client_socket_service] 315 call lws_client_interpret_server_handshake<br>[2017/02/09 17:46:07:8551] ERR: [lws_client_interpret_server_handshake] 470 http_response=400<br>[2017/02/09 17:46:07:8567] ERR: [lws_service_fd_tsi] 1142 retrun 1<br>[2017/02/09 17:46:07:8567] NOTICE: lws_context_destroy: ctx 0x7fa3dc803c00<br>[2017/02/09 17:46:07:8567] NOTICE: lws_context_destroy2: ctx 0x7fa3dc803c00<br><br><div><div><div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2017-02-09 15:27 GMT+08:00 Andy Green <span dir="ltr"><<a href="mailto:andy@warmcat.com" target="_blank">andy@warmcat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 02/09/2017 02:40 PM, 黃小偉 wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hello,<br>
<br>
I have a problem when my client received websocket redirect response from server.<br>
<br>
Scenario:<br>
a. Connect to server with ip:A, port:B<br>
b. Server response redirect information with ip:C, port:D<br>
c. libwebsocket try to connect with lws_client_reset but failed due to LWS_ERRNO = 36 = LWS_EINPROGRESS and no more retry<br>
d. Client received LWS_CALLBACK_CLIENT_CONNECTION<wbr>_ERROR with reason "HS: Redirect failed."<br>
<br>
If I stop client and change ip to C and port to D then run it, it can connect to server successfully.<br>
<br>
I am using latest libwebsocket version.<br>
<br>
How can I deal with this situation ? Any advice or something to try ?<br>
</blockquote>
<br>
I pushed a patch on master that should fix it<br>
<br>
<a href="https://github.com/warmcat/libwebsockets/commit/ce70d583d4570f6c9c70177a47166c467ff60c7d" rel="noreferrer" target="_blank">https://github.com/warmcat/lib<wbr>websockets/commit/ce70d583d457<wbr>0f6c9c70177a47166c467ff60c7d</a><br>
<br>
Client redirect had rotted a bit anyway, but until this patch it was also missing the ability to redirect between http / https and vice versa; that should now work.<br>
<br>
-Andy<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Appreciate it.<br>
<br>
----FAILED LOG---------------------------<wbr>----------------------------<br>
[ws_start_service]: websocket service starting ...<br>
<br>
====== ws service info ======<br>
host=10.70.50.187<br>
port=80<br>
path=/msg/fa07c9f0-d2ed-4636-8<wbr>3ad-d6f3bee0f452/00000000-0001<wbr>-0001-0001-000000000008/BUZqud<wbr>wFqzmwKF8fvMSu9FFb4TmTyqeb6RGf<wbr>1ijd<br>
==================<br>
<br>
ws_callback: LWS_CALLBACK_PROTOCOL_INIT<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_ADD_POLL_FD<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_<wbr>FD<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
ws_callback: LWS_CALLBACK_WSI_CREATE<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_<wbr>FD<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
ws_callback: LWS_CALLBACK_GET_THREAD_ID<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_<wbr>FD<br>
ws_callback: LWS_CALLBACK_GET_THREAD_ID<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_<wbr>FD<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
ws_callback: LWS_CALLBACK_CLIENT_APPEND_HAN<wbr>DSHAKE_HEADER<br>
[2017/02/09 13:40:08:4191] NOTICE: Initial logging level 7<br>
[2017/02/09 13:40:08:4191] NOTICE: Libwebsockets version: 2.1.0<br>
[2017/02/09 13:40:08:4191] NOTICE: IPV6 not compiled in<br>
[2017/02/09 13:40:08:4191] NOTICE: libev support not compiled in<br>
[2017/02/09 13:40:08:4191] NOTICE: libuv support not compiled in<br>
[2017/02/09 13:40:08:4191] NOTICE:  Threads: 4 each 2560 fds<br>
[2017/02/09 13:40:08:4193] NOTICE:  mem: platform fd map: 81920 bytes<br>
[2017/02/09 13:40:08:4193] NOTICE:  Compiled with OpenSSL support<br>
[2017/02/09 13:40:08:4193] NOTICE:  SSL disabled: no LWS_SERVER_OPTION_DO_SSL_GLOBA<wbr>L_INIT<br>
[2017/02/09 13:40:08:4193] NOTICE: Creating Vhost 'default' port -1, 1 protocols, IPv6 off<br>
[2017/02/09 13:40:08:4193] NOTICE:  mem: per-conn:          568 bytes + protocol rx buf<br>
[2017/02/09 13:40:08:4193] NOTICE:  canonical_hostname = Mac-mini.local<br>
[2017/02/09 13:40:08:4194] ERR: [lws_client_connect_via_info2] 731 call lws_client_connect_2<br>
[2017/02/09 13:40:08:4194] ERR: [lws_client_connect_2][18] enter ===<br>
[2017/02/09 13:40:08:4194] ERR: [lws_client_connect_2] 28<br>
[2017/02/09 13:40:08:4194] ERR: [lws_client_connect_2] 52 not proxy<br>
[2017/02/09 13:40:08:4194] ERR: [lws_client_connect_2] 60 socket server_addr4.sin_port=80<br>
[2017/02/09 13:40:08:4194] ERR: [lws_client_connect_2] 67 ads=10.70.50.187<br>
[2017/02/09 13:40:08:4194] ERR: [lws_client_connect_2] 119<br>
[2017/02/09 13:40:08:4203] ERR: [lws_client_connect_2] 173 socket invalid = null<br>
[2017/02/09 13:40:08:4203] ERR: [lws_client_connect_2] 185 socket bind again, valid not null !!!<br>
[2017/02/09 13:40:08:4213] ERR: [lws_client_connect_2] 193 set wsi->mode = LWSCM_WSCL_WAITING_CONNECT<br>
[2017/02/09 13:40:08:4213] ERR: [lws_client_connect_2] 210 past here, we can't simply free the structs as error handling as oom4 does.  We have to run the whole close flow.<br>
[2017/02/09 13:40:08:4213] ERR: [lws_client_connect_2] 237 check again: socket valid o<br>
[2017/02/09 13:40:08:4214] ERR: [lws_client_connect_2] 245 nonblocking connect retry (errno = 36)<br>
[2017/02/09 13:40:08:4214] ERR: [lws_client_connect_2] 262 return wsi<br>
[2017/02/09 13:40:08:4215] ERR: [lws_service_fd_tsi] 1140 call lws_client_socket_service<br>
[2017/02/09 13:40:08:4215] ERR: [lws_client_socket_service] 85 wsi->mode=34<br>
[2017/02/09 13:40:08:4215] ERR: [lws_client_socket_service] 89 LWSCM_WSCL_WAITING_CONNECT=34, call lws_client_connect_2<br>
[2017/02/09 13:40:08:4215] ERR: we are under PENDING_TIMEOUT_SENT_CLIENT_HA<wbr>NDSHAKE timeout protection set in client-handshake.c<br>
[2017/02/09 13:40:08:4215] ERR: [lws_client_connect_2][18] enter ===<br>
[2017/02/09 13:40:08:4215] ERR: [lws_client_connect_2] 28<br>
[2017/02/09 13:40:08:4215] ERR: [lws_client_connect_2] 52 not proxy<br>
[2017/02/09 13:40:08:4215] ERR: [lws_client_connect_2] 60 socket server_addr4.sin_port=80<br>
[2017/02/09 13:40:08:4215] ERR: [lws_client_connect_2] 67 ads=10.70.50.187<br>
[2017/02/09 13:40:08:4215] ERR: [lws_client_connect_2] 119<br>
[2017/02/09 13:40:08:4219] ERR: [lws_client_connect_2] 225 socket valid not null<br>
[2017/02/09 13:40:08:4220] ERR: [lws_client_connect_2] 237 check again: socket valid o<br>
[2017/02/09 13:40:08:4220] ERR: [lws_client_connect_2] 272 connected<br>
[2017/02/09 13:40:08:4220] ERR: [lws_service_fd_tsi] 1140 call lws_client_socket_service<br>
[2017/02/09 13:40:08:4220] ERR: [lws_client_socket_service] 85 wsi->mode=36<br>
[2017/02/09 13:40:08:4220] ERR: [lws_client_socket_service] 144 LWSCM_WSCL_ISSUE_HANDSHAKE<br>
[2017/02/09 13:40:08:4312] ERR: [lws_service_fd_tsi] 1143 goto handled<br>
[2017/02/09 13:40:08:4312] ERR: [lws_service_fd_tsi] 1143 goto handled<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_DEL_POLL_FD<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_ADD_POLL_FD<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
ws_callback: LWS_CALLBACK_WSI_CREATE<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_<wbr>FD<br>
ws_callback: LWS_CALLBACK_GET_THREAD_ID<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
ws_callback: LWS_CALLBACK_CLIENT_CONNECTION<wbr>_ERROR<br>
[ws_callback] Connect with server error: HS: Redirect failed<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_<wbr>FD<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_DEL_POLL_FD<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
[2017/02/09 13:40:08:4361] ERR: [lws_service_fd_tsi] 1140 call lws_client_socket_service<br>
[2017/02/09 13:40:08:4361] ERR: [lws_client_socket_service] 85 wsi->mode=40<br>
[2017/02/09 13:40:08:4361] ERR: [lws_client_socket_service] 247 LWSCM_WSCL_WAITING_SERVER_REPL<wbr>Y<br>
[2017/02/09 13:40:08:4365] ERR: [lws_client_socket_service] 315 call lws_client_interpret_server_ha<wbr>ndshake<br>
[2017/02/09 13:40:08:4365] ERR: [lws_client_interpret_server_h<wbr>andshake] 470 http_response=301<br>
[2017/02/09 13:40:08:4365] ERR: [lws_client_interpret_server_h<wbr>andshake] 485 call lws_client_reset, ads=10.70.50.187, port=8080, path=msg/fa07c9f0-d2ed-4636-83<wbr>ad-d6f3bee0f452/00000000-0001-<wbr>0001-0001-000000000008/BUZqudw<wbr>FqzmwKF8fvMSu9FFb4TmTyqeb6RGf1<wbr>ijd<br>
[2017/02/09 13:40:08:4366] NOTICE: [lws_client_reset] 392 redirect ads='10.70.50.187', port=8080, path='msg/fa07c9f0-d2ed-4636-8<wbr>3ad-d6f3bee0f452/00000000-0001<wbr>-0001-0001-000000000008/BUZqud<wbr>wFqzmwKF8fvMSu9FFb4TmTyqeb6RGf<wbr>1ijd'<br>
[2017/02/09 13:40:08:4366] NOTICE: [lws_client_reset] 410 call lws_client_connect_2<br>
[2017/02/09 13:40:08:4366] ERR: [lws_client_connect_2][18] enter ===<br>
[2017/02/09 13:40:08:4366] ERR: [lws_client_connect_2] 28<br>
[2017/02/09 13:40:08:4366] ERR: [lws_client_connect_2] 52 not proxy<br>
[2017/02/09 13:40:08:4366] ERR: [lws_client_connect_2] 60 socket server_addr4.sin_port=8080<br>
[2017/02/09 13:40:08:4366] ERR: [lws_client_connect_2] 67 ads=10.70.50.187<br>
[2017/02/09 13:40:08:4366] ERR: [lws_client_connect_2] 119<br>
[2017/02/09 13:40:08:4370] ERR: [lws_client_connect_2] 173 socket invalid = null<br>
[2017/02/09 13:40:08:4370] ERR: [lws_client_connect_2] 185 socket bind again, valid not null !!!<br>
[2017/02/09 13:40:08:4370] ERR: [lws_client_connect_2] 193 set wsi->mode = LWSCM_WSCL_WAITING_CONNECT<br>
[2017/02/09 13:40:08:4370] ERR: [lws_client_connect_2] 210 past here, we can't simply free the structs as error handling as oom4 does.  We have to run the whole close flow.<br>
[2017/02/09 13:40:08:4371] ERR: [lws_client_connect_2] 237 check again: socket valid o<br>
[2017/02/09 13:40:08:4371] ERR: [lws_client_connect_2] 245 nonblocking connect retry (errno = 36)<br>
[2017/02/09 13:40:08:4371] ERR: [lws_client_connect_2] 262 return wsi<br>
[2017/02/09 13:40:08:4371] ERR: [lws_client_interpret_server_h<wbr>andshake] 487 Redirect failed<br>
[2017/02/09 13:40:08:4371] ERR: [lws_client_interpret_server_h<wbr>andshake] 488 check wsi->mode=34<br>
ws_callback: LWS_CALLBACK_WSI_DESTROY<br>
[2017/02/09 13:40:08:4387] ERR: [lws_service_fd_tsi] 1142 retrun 1<br>
<br>
----SUCCESS LOG---------------------------<wbr>----------------------------<br>
[ws_start_service]: websocket service starting ...<br>
<br>
====== ws service info ======<br>
host=10.70.50.187<br>
port=8080<br>
path=/msg/fa07c9f0-d2ed-4636-8<wbr>3ad-d6f3bee0f452/00000000-0001<wbr>-0001-0001-000000000008/BUZqud<wbr>wFqzmwKF8fvMSu9FFb4TmTyqeb6RGf<wbr>1ijd<br>
==================<br>
<br>
ws_callback: LWS_CALLBACK_PROTOCOL_INIT<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_ADD_POLL_FD<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_<wbr>FD<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
ws_callback: LWS_CALLBACK_WSI_CREATE<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_<wbr>FD<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
ws_callback: LWS_CALLBACK_GET_THREAD_ID<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_<wbr>FD<br>
ws_callback: LWS_CALLBACK_GET_THREAD_ID<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
ws_callback: LWS_CALLBACK_LOCK_POLL<br>
ws_callback: LWS_CALLBACK_CHANGE_MODE_POLL_<wbr>FD<br>
ws_callback: LWS_CALLBACK_UNLOCK_POLL<br>
ws_callback: LWS_CALLBACK_CLIENT_APPEND_HAN<wbr>DSHAKE_HEADER<br>
[2017/02/09 13:38:17:8137] NOTICE: Initial logging level 7<br>
[2017/02/09 13:38:17:8137] NOTICE: Libwebsockets version: 2.1.0<br>
[2017/02/09 13:38:17:8137] NOTICE: IPV6 not compiled in<br>
[2017/02/09 13:38:17:8137] NOTICE: libev support not compiled in<br>
[2017/02/09 13:38:17:8137] NOTICE: libuv support not compiled in<br>
[2017/02/09 13:38:17:8138] NOTICE:  Threads: 4 each 2560 fds<br>
[2017/02/09 13:38:17:8140] NOTICE:  mem: platform fd map: 81920 bytes<br>
[2017/02/09 13:38:17:8143] NOTICE:  Compiled with OpenSSL support<br>
[2017/02/09 13:38:17:8143] NOTICE:  SSL disabled: no LWS_SERVER_OPTION_DO_SSL_GLOBA<wbr>L_INIT<br>
[2017/02/09 13:38:17:8143] NOTICE: Creating Vhost 'default' port -1, 1 protocols, IPv6 off<br>
[2017/02/09 13:38:17:8143] NOTICE:  mem: per-conn:          568 bytes + protocol rx buf<br>
[2017/02/09 13:38:17:8145] NOTICE:  canonical_hostname = Mac-mini.local<br>
[2017/02/09 13:38:17:8147] ERR: [lws_client_connect_via_info2] 731 call lws_client_connect_2<br>
[2017/02/09 13:38:17:8150] ERR: [lws_client_connect_2][18] enter ===<br>
[2017/02/09 13:38:17:8150] ERR: [lws_client_connect_2] 28<br>
[2017/02/09 13:38:17:8150] ERR: [lws_client_connect_2] 52 not proxy<br>
[2017/02/09 13:38:17:8150] ERR: [lws_client_connect_2] 60 socket server_addr4.sin_port=8080<br>
[2017/02/09 13:38:17:8150] ERR: [lws_client_connect_2] 67 ads=10.70.50.187<br>
[2017/02/09 13:38:17:8150] ERR: [lws_client_connect_2] 119<br>
[2017/02/09 13:38:17:8161] ERR: [lws_client_connect_2] 173 socket invalid = null<br>
[2017/02/09 13:38:17:8162] ERR: [lws_client_connect_2] 185 socket bind again, valid not null !!!<br>
[2017/02/09 13:38:17:8170] ERR: [lws_client_connect_2] 193 set wsi->mode = LWSCM_WSCL_WAITING_CONNECT<br>
[2017/02/09 13:38:17:8171] ERR: [lws_client_connect_2] 210 past here, we can't simply free the structs as error handling as oom4 does.  We have to run the whole close flow.<br>
[2017/02/09 13:38:17:8171] ERR: [lws_client_connect_2] 237 check again: socket valid o<br>
[2017/02/09 13:38:17:8171] ERR: [lws_client_connect_2] 245 nonblocking connect retry (errno = 36)<br>
[2017/02/09 13:38:17:8171] ERR: [lws_client_connect_2] 262 return wsi<br>
[2017/02/09 13:38:17:8172] ERR: [lws_service_fd_tsi] 1140 call lws_client_socket_service<br>
[2017/02/09 13:38:17:8172] ERR: [lws_client_socket_service] 85 wsi->mode=34<br>
[2017/02/09 13:38:17:8172] ERR: [lws_client_socket_service] 89 LWSCM_WSCL_WAITING_CONNECT=34, call lws_client_connect_2<br>
[2017/02/09 13:38:17:8173] ERR: we are under PENDING_TIMEOUT_SENT_CLIENT_HA<wbr>NDSHAKE timeout protection set in client-handshake.c<br>
[2017/02/09 13:38:17:8173] ERR: [lws_client_connect_2][18] enter ===<br>
[2017/02/09 13:38:17:8173] ERR: [lws_client_connect_2] 28<br>
[2017/02/09 13:38:17:8173] ERR: [lws_client_connect_2] 52 not proxy<br>
[2017/02/09 13:38:17:8173] ERR: [lws_client_connect_2] 60 socket server_addr4.sin_port=8080<br>
[2017/02/09 13:38:17:8173] ERR: [lws_client_connect_2] 67 ads=10.70.50.187<br>
[2017/02/09 13:38:17:8173] ERR: [lws_client_connect_2] 119<br>
[2017/02/09 13:38:17:8177] ERR: [lws_client_connect_2] 225 socket valid not null<br>
[2017/02/09 13:38:17:8177] ERR: [lws_client_connect_2] 237 check again: socket valid o<br>
[2017/02/09 13:38:17:8177] ERR: [lws_client_connect_2] 272 connected<br>
[2017/02/09 13:38:17:8177] ERR: [lws_service_fd_tsi] 1140 call lws_client_socket_service<br>
[2017/02/09 13:38:17:8177] ERR: [lws_client_socket_service] 85 wsi->mode=36<br>
[2017/02/09 13:38:17:8177] ERR: [lws_client_socket_service] 144 LWSCM_WSCL_ISSUE_HANDSHAKE<br>
[2017/02/09 13:38:17:8222] ERR: [lws_service_fd_tsi] 1143 goto handled<br>
[2017/02/09 13:38:17:8223] ERR: [lws_service_fd_tsi] 1143 goto handled<br>
[2017/02/09 13:38:17:8336] ERR: [lws_service_fd_tsi] 1140 call lws_client_socket_service<br>
[2017/02/09 13:38:17:8336] ERR: [lws_client_socket_service] 85 wsi->mode=40<br>
[2017/02/09 13:38:17:8336] ERR: [lws_client_socket_service] 247 LWSCM_WSCL_WAITING_SERVER_REPL<wbr>Y<br>
[2017/02/09 13:38:17:8338] ERR: [lws_client_socket_service] 315 call lws_client_interpret_server_ha<wbr>ndshake<br>
[2017/02/09 13:38:17:8339] ERR: [lws_client_interpret_server_h<wbr>andshake] 470 http_response=101<br>
[2017/02/09 13:38:17:8339] ERR: [lws_client_interpret_server_h<wbr>andshake] 864 set LWS_CALLBACK_CLIENT_FILTER_PRE<wbr>_ESTABLISH<br>
[2017/02/09 13:38:17:8339] ERR: [lws_service_fd_tsi] 1143 goto handled<br>
ws_callback: LWS_CALLBACK_CLIENT_FILTER_PRE<wbr>_ESTABLISH<br>
ws_callback: LWS_CALLBACK_CLIENT_ESTABLISHE<wbr>D<br>
[ws_callback] Connect with server success.<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Wayne<br>
<br>
<br>
______________________________<wbr>_________________<br>
Libwebsockets mailing list<br>
<a href="mailto:Libwebsockets@ml.libwebsockets.org" target="_blank">Libwebsockets@ml.libwebsockets<wbr>.org</a><br>
<a href="https://libwebsockets.org/mailman/listinfo/libwebsockets" rel="noreferrer" target="_blank">https://libwebsockets.org/mail<wbr>man/listinfo/libwebsockets</a><br>
</blockquote>
<br>
</blockquote></div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>