[Libwebsockets] stuck on url

Trey Weaver treyweaver at fastmail.net
Mon May 17 22:22:22 CEST 2021


I am trying to get our system to connect to a wss server called:  wss://xxx.io/ws/jpsdemo <http://zellowork.io/ws/jpsdemo>

I know that I can not do a dns lookup on the whole thing.  So I tried the following:

*lws_client_connect_info.address = xxx.io**
*
*lws_client_connect_info.host = wss://**xxx.io/ws/jpsdemo*

And it looks like it does the dns correctly (which is 3 ip addresses), but it looks like it never goes to the full URI.   And does not connect.

Below is the debug.  I am using wolfssl if that makes any difference.

Trey Weaver

[2021/05/17 19:34:25:2205] U: Starting lws setup.
[2021/05/17 19:34:25:2212] U: lws_create_context.
[2021/05/17 19:34:25:2221] N: LWS: 4.2.99-v4.2.0-27-ga3765d11, loglevel 65535
[2021/05/17 19:34:25:2225] N: NET CLI SRV H1 H2 WS ConMon IPv6-absent
[2021/05/17 19:34:25:2229] I: Event loop: poll
[2021/05/17 19:34:25:2232] D: _realloc: size 6152: context
[2021/05/17 19:34:25:2237] D: _realloc: size 28: lws_smd_register
[2021/05/17 19:34:25:2242] I: lws_smd_register: peer 0xa7ff4020 (count 1) registered
[2021/05/17 19:34:25:2246] D: _realloc: size 40: fds table
[2021/05/17 19:34:25:2249] I:  ctx:  5368B (1272 ctx + pt(1 thr x 4096)), pt-fds: 5, fdmap: 40
[2021/05/17 19:34:25:2252] I:  http: ah_data: 4096, ah: 960, max count 5
[2021/05/17 19:34:25:2255] D: _realloc: size 20: lws_lookup
[2021/05/17 19:34:25:2258] I:  mem: platform fd map:    20 B
[2021/05/17 19:34:25:2265] D: _realloc: size 784: __lws_wsi_create_with_role
[2021/05/17 19:34:25:2268] D: lws_role_transition: : wsistate 0x200, ops pipe
[2021/05/17 19:34:25:2271] N:  ++ [wsi|0|pipe] (1)
[2021/05/17 19:34:25:2274] D: event pipe fd 22
[2021/05/17 19:34:25:2277] D: __insert_wsi_socket_into_fds: [wsi|0|pipe]: tsi=0, sock=22, pos-in-fds=0
[2021/05/17 19:34:25:2280] I: rops_pt_init_destroy_netlink: creating netlink skt
[2021/05/17 19:34:25:2282] D: _realloc: size 784: __lws_wsi_create_with_role
[2021/05/17 19:34:25:2296] D: lws_role_transition: : wsistate 0x200, ops netlink
[2021/05/17 19:34:25:2299] N:  ++ [vh|0|netlink] (1)
[2021/05/17 19:34:25:2302] D: __insert_wsi_socket_into_fds: [vh|0|netlink]: tsi=0, sock=23, pos-in-fds=1
[2021/05/17 19:34:25:2305] D: rops_pt_init_destroy_netlink: starting netlink coldplug wait
[2021/05/17 19:34:25:2308] I:  Compiled with wolfSSL support
[2021/05/17 19:34:25:2311] I: Doing SSL library init
[2021/05/17 19:34:25:2316] I:  canonical_hostname = dsp
[2021/05/17 19:34:25:2319] D: _realloc: size 664: lws_create_vhost
[2021/05/17 19:34:25:2321] N:  ++ [vh|1|default||-1] (2)
[2021/05/17 19:34:25:2324] D: _realloc: size 56: vh plugin table
[2021/05/17 19:34:25:2327] D: _realloc: size 12: same vh list
[2021/05/17 19:34:25:2329] I: Creating Vhost 'default' (serving disabled), 1 protocols, IPv6 off
[2021/05/17 19:34:25:2335] D: _realloc: size 56: client ctx tcr
[2021/05/17 19:34:25:2338] I: lws_tls_client_create_vhost_context: vh default: created new client ctx 0
[2021/05/17 19:34:25:2344] I: loaded ssl_ca_filepath
[2021/05/17 19:34:25:2347] I: created client ssl context for default
[2021/05/17 19:34:25:2349] U: Callback not Transfered: 0x15 21.
[2021/05/17 19:34:25:2352] I:  mem: per-conn:          784 bytes + protocol rx buf
[2021/05/17 19:34:25:2355] I: lws_plat_drop_app_privileges: not changing group
[2021/05/17 19:34:25:2358] I: lws_plat_drop_app_privileges: not changing user
[2021/05/17 19:34:25:2360] D: lws_cancel_service
[2021/05/17 19:34:25:2369] U: lws_client_connect_via_info.
[2021/05/17 19:34:25:2384] I: lws_protocol_init
[2021/05/17 19:34:25:2387] D: lws_protocol_init_vhost: not instantiating default.lws-minimal-client
[2021/05/17 19:34:25:2390] I: lws_protocol_init_vhost: init default.lws-minimal-client
[2021/05/17 19:34:25:2396] U: Callback not Transfered: LWS_CALLBACK_PROTOCOL_INIT.
[2021/05/17 19:34:25:2398] D: _realloc: size 784: __lws_wsi_create_with_role
[2021/05/17 19:34:25:2400] D: lws_role_transition: : wsistate 0x200, ops (unset)
[2021/05/17 19:34:25:2405] D: lws_vhost_bind_wsi: vh default: wsi none/none, count_bound_wsi 1
[2021/05/17 19:34:25:2407] D: _realloc: size 176: client ws struct
[2021/05/17 19:34:25:2410] D: lws_role_transition: : wsistate 0x10000200, ops h1
[2021/05/17 19:34:25:2412] I: lws_client_connect_via_info: role binding to h1
[2021/05/17 19:34:25:2415] I: lws_client_connect_via_info: vh default protocol binding to lws-minimal-client
[2021/05/17 19:34:25:2418] D: _realloc: size 4: user space
[2021/05/17 19:34:25:2420] U: Callback not Transfered: LWS_CALLBACK_SERVER_NEW_CLIENT_INSTANTIATED.
[2021/05/17 19:34:25:2422] I: lws_client_connect_via_info: : h1 lws-minimal-client entry
[2021/05/17 19:34:25:2425] D: _realloc: size 113: client stash
[2021/05/17 19:34:25:2429] N:  ++ [wsicli|0|WS/h1/zellowork.io] (1)
[2021/05/17 19:34:25:2431] I: lws_header_table_attach: [wsicli|0|WS/h1/zellowork.io]: ah (nil) (tsi 0, count = 0) in
[2021/05/17 19:34:25:2434] D: _realloc: size 960: ah struct
[2021/05/17 19:34:25:2436] D: _realloc: size 4096: ah data
[2021/05/17 19:34:25:2439] I: _lws_create_ah: created ah 0xa53d23a8 (size 4096): pool length 1
[2021/05/17 19:34:25:2441] I: lws_header_table_attach: did attach wsi [wsicli|0|WS/h1/zellowork.io]: ah 0xa53d23a8: count 1 (on exit)
[2021/05/17 19:34:25:2444] D: __lws_set_timeout: [wsicli|0|WS/h1/zellowork.io]: 10 secs, reason 25
[2021/05/17 19:34:25:2447] D: lws_http_client_connect_via_info2: [wsicli|0|WS/h1/zellowork.io] (stash 0xa53cf1a0)
[2021/05/17 19:34:25:2450] D: lws_client_connect_2_dnsreq: new conn on no pipeline flag
[2021/05/17 19:34:25:2453] D: _realloc: size 30: strdup
[2021/05/17 19:34:25:2456] D: lwsi_set_state([wsicli|0|WS/h1/zellowork.io], 0x10000201)
[2021/05/17 19:34:25:2458] I: lws_client_connect_2_dnsreq: [wsicli|0|WS/h1/zellowork.io]: lookup zellowork.io:65535
[2021/05/17 19:34:25:3901] I: lws_getaddrinfo46: getaddrinfo 'zellowork.io' says 0
[2021/05/17 19:34:25:3911] I: lws_sort_dns: sort_dns: 0xae7fd8e8
[2021/05/17 19:34:25:3914] D: _realloc: size 88: lws_sort_dns
[2021/05/17 19:34:25:3917] I: lws_sort_dns: unsorted entry (af 2) 104.26.5.67
[2021/05/17 19:34:25:3919] D: _realloc: size 88: lws_sort_dns
[2021/05/17 19:34:25:3921] I: lws_sort_dns: unsorted entry (af 2) 104.26.4.67
[2021/05/17 19:34:25:3924] D: _realloc: size 88: lws_sort_dns
[2021/05/17 19:34:25:3926] I: lws_sort_dns: unsorted entry (af 2) 172.67.69.200
[2021/05/17 19:34:25:3929] I: lws_sort_dns: skip 10 28 16
[2021/05/17 19:34:25:3932] I: lws_sort_dns: skip 10 28 16
[2021/05/17 19:34:25:3935] I: lws_sort_dns: skip 10 28 16
[2021/05/17 19:34:25:3937] I: lws_sort_dns_dump: 1: (2)104.26.5.67, gw (0)(unset), idi: 0, lbl: 0, prec: 0
[2021/05/17 19:34:25:3939] I: lws_sort_dns_dump: 2: (2)104.26.4.67, gw (0)(unset), idi: 0, lbl: 0, prec: 0
[2021/05/17 19:34:25:3942] I: lws_sort_dns_dump: 3: (2)172.67.69.200, gw (0)(unset), idi: 0, lbl: 0, prec: 0
[2021/05/17 19:34:25:3945] I: lws_client_connect_3_connect: peer_route_uidx 0
[2021/05/17 19:34:25:3948] D: lws_client_connect_3_connect: [wsicli|0|WS/h1/zellowork.io]: WAITING_CONNECT
[2021/05/17 19:34:25:3951] D: lwsi_set_state([wsicli|0|WS/h1/zellowork.io], 0x10000202)
[2021/05/17 19:34:25:3954] D: __insert_wsi_socket_into_fds: [wsicli|0|WS/h1/zellowork.io]: tsi=0, sock=24, pos-in-fds=2
[2021/05/17 19:34:25:3956] D: _lws_change_pollfd: [wsicli|0|WS/h1/zellowork.io]: fd 24 events 1 -> 1
[2021/05/17 19:34:25:3959] D: __lws_set_timeout: [wsicli|0|WS/h1/zellowork.io]: 20 secs, reason 2
[2021/05/17 19:34:25:3961] U: test not zero 0x69.
[2021/05/17 19:34:25:3967] D: lws_client_connect_3_connect: connect: errno: 115
[2021/05/17 19:34:25:3975] D: _lws_change_pollfd: [wsicli|0|WS/h1/zellowork.io]: fd 24 events 1 -> 5
[2021/05/17 19:34:25:3986] D: lws_client_connect_via_info: [wsicli|0|WS/h1/zellowork.io]: adoption cb 19 to h1 lws-minimal-client
[2021/05/17 19:34:25:3989] U: test not zero 0x13.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20210517/58b04ca4/attachment.htm>


More information about the Libwebsockets mailing list