[Libwebsockets] libwebsockets-test-client timeout error

Jun MA mj.saber1990 at gmail.com
Mon Apr 4 03:05:00 CEST 2016


Hi guys,

I’m new to lws and I met some issue when start playing with it. Hope you guys can help me out.
I ran libwebsockets-test-server on my local machine and I can connect to it by web browser(127.0.0.1:7681), but when I tried 'libwebsockets-test-client localhost’, I got following messages:
[2016/03/03 17:45:36:4491] NOTICE: libwebsockets test client - license LGPL2.1+SLE
[2016/03/03 17:45:36:4491] NOTICE: (C) Copyright 2010-2016 Andy Green <andy at warmcat.com>
[2016/03/03 17:45:36:4491] NOTICE: Initial logging level 7
[2016/03/03 17:45:36:4491] NOTICE: Libwebsockets version: 1.7.0 jun.ma at MacBook-Pro-2.local-v1.7.0-97-g0d0124a
[2016/03/03 17:45:36:4491] NOTICE: IPV6 not compiled in
[2016/03/03 17:45:36:4492] NOTICE: libev support not compiled in
[2016/03/03 17:45:36:4492] NOTICE: libuv support not compiled in
[2016/03/03 17:45:36:4492] NOTICE:  Threads: 1 each 2560 fds
[2016/03/03 17:45:36:4492] NOTICE:  mem: platform fd map: 10240 bytes
[2016/03/03 17:45:36:4493] NOTICE: Creating Vhost 'default' port -1, 2 protocols
[2016/03/03 17:45:36:4493] NOTICE:  mem: per-conn:          332 bytes + protocol rx buf
[2016/03/03 17:45:36:4493] NOTICE:  canonical_hostname = MacBook-Pro-2.local
[2016/03/03 17:45:36:4493] NOTICE: using  mode (ws)
[2016/03/03 17:45:36:4493] NOTICE: dumb: connecting
[2016/03/03 17:45:36:4840] NOTICE: mirror: connecting
[2016/03/03 17:45:57:0946] NOTICE: wsi 0x7c150920: TIMEDOUT WAITING on 2 (did hdr 0, ah 0x7ba2f098, wl 0, pfd events 0)
[2016/03/03 17:45:57:0947] ERR: mirror: LWS_CALLBACK_CLIENT_CONNECTION_ERROR
[2016/03/03 17:45:57:0948] NOTICE: lws_header_table_detach: wsi 0x7c150920: ah held 21s, ah.rxpos 0, ah.rxlen 0, mode/state 10 4,wsi->more_rx_waiting 0
[2016/03/03 17:45:57:0948] NOTICE: wsi 0x7af507e0: TIMEDOUT WAITING on 2 (did hdr 0, ah 0x7ba2e400, wl 0, pfd events 0)
[2016/03/03 17:45:57:0948] ERR: dumb: LWS_CALLBACK_CLIENT_CONNECTION_ERROR
[2016/03/03 17:45:57:0948] NOTICE: lws_header_table_detach: wsi 0x7af507e0: ah held 21s, ah.rxpos 0, ah.rxlen 0, mode/state 10 4,wsi->more_rx_waiting 0
[2016/03/03 17:45:57:0948] NOTICE: dumb: connecting
[2016/03/03 17:45:57:1273] NOTICE: mirror: connecting
[2016/03/03 17:46:18:2726] NOTICE: wsi 0x7c250740: TIMEDOUT WAITING on 2 (did hdr 0, ah 0x7ba2f098, wl 0, pfd events 0)
[2016/03/03 17:46:18:2727] ERR: mirror: LWS_CALLBACK_CLIENT_CONNECTION_ERROR
[2016/03/03 17:46:18:2728] NOTICE: lws_header_table_detach: wsi 0x7c250740: ah held 21s, ah.rxpos 0, ah.rxlen 0, mode/state 10 4,wsi->more_rx_waiting 0
[2016/03/03 17:46:18:2728] NOTICE: wsi 0x7c250500: TIMEDOUT WAITING on 2 (did hdr 0, ah 0x7ba2e400, wl 0, pfd events 0)
[2016/03/03 17:46:18:2728] ERR: dumb: LWS_CALLBACK_CLIENT_CONNECTION_ERROR
[2016/03/03 17:46:18:2728] NOTICE: lws_header_table_detach: wsi 0x7c250500: ah held 21s, ah.rxpos 0, ah.rxlen 0, mode/state 10 4,wsi->more_x_waiting 0

I’m using mac os el capitan x86_64, I’m not sure if this is related but I do have a hard time trying to compile this library.
If I built the make file by using cmake -DLWS_WITH_SSL=0, when making the file, I got the following:
Undefined symbols for architecture x86_64:
 "_deflate", referenced from:
     _lws_extension_callback_pm_deflate in extension-permessage-deflate.c.o
    (maybe you meant: _lws_ext_pm_deflate_options, _lws_extension_callback_pm_deflate )
 "_deflateEnd", referenced from:
     _lws_extension_callback_pm_deflate in extension-permessage-deflate.c.o
 "_deflateInit2_", referenced from:
     _lws_extension_callback_pm_deflate in extension-permessage-deflate.c.o
 "_inflate", referenced from:
     _lws_extension_callback_pm_deflate in extension-permessage-deflate.c.o
 "_inflateEnd", referenced from:
     _lws_extension_callback_pm_deflate in extension-permessage-deflate.c.o
 "_inflateInit2_", referenced from:
     _lws_extension_callback_pm_deflate in extension-permessage-deflate.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libwebsockets.7.dylib] Error 1
make[1]: *** [CMakeFiles/websockets_shared.dir/all] Error 2
make: *** [all] Error 2

I tried cmake -DLWS_WITH_SSL=0 -DCMAKE_OSX_ARCHITECTURES:STRING=x86_64, same error.
So I had to use cmake -DLWS_WITH_SSL=0 -DCMAKE_OSX_ARCHITECTURES:STRING=i386 to by pass this error message.
I’m not sure if this is related but this is the only thing I did so far.

Looking forward any suggestion, thank you all in advance.

Bests,
Jun


More information about the Libwebsockets mailing list