[Libwebsockets] Upgraded from 3.2 to v4.2.0 and getting an error

Dave Horton daveh at beachdognet.com
Tue Apr 20 13:50:54 CEST 2021


I am running on an AWS EC2 instance running debian buster, would that account for this behavior?

I recompiled with that flag, and it seems to work better now, but I am seeing this logging now (below, with a read error) when I try to send data over the socket, and the socket appears to not be in a writable state frequently, as I notice my sending process is having to wait and buffer a lot of data. 

2021-04-20 11:46:30.085950 [NOTICE] lws_glue.cpp:287  ++ [wsicli|0|WS/h1/test-apps.jambonz.us] (1)
2021-04-20 11:46:30.125962 [NOTICE] lws_glue.cpp:287 rops_handle_POLLIN_pipe: eventfd read 7 bailed errno 11
2021-04-20 11:46:30.125962 [NOTICE] lws_glue.cpp:287  -- [wsi|0|pipe] (0) 21.162s


On Apr 19, 2021, at 10:54 PM, andy at warmcat.com wrote:



On April 20, 2021 2:38:06 AM UTC, Dave Horton <daveh at beachdognet.com> wrote:
> I have some ws client code that has been running on 3.2 for quite a
> while with no issues, when I tried to upgrade to v4.2.0 I am getting an
> error.  Specifically, my lws_service call is returning right away with
> an error.
> 
> I am wondering if there are any pointers on necessary changes when
> upgrading from 3.x to 4.x?
> 
> The logs I see when I start my process are:
> 
> *****
> lws_service_thread creating context in service thread 0.
> 
> LWS: 4.2.0-v4.2.0, loglevel 7
> NET CLI SRV H1 H2 WS ConMon IPv6-absent
> ++ [wsi|0|pipe] (1)
> ++ [vh|0|netlink] (1)
> ERROR: rops_pt_init_destroy_netlink: netlink bind failed. 

Does your kernel have netlink disabled, or your app already listens on netlink (only one per process allowed)?  Or some CAP needed on your system (normal users have it on all systems so far, this was introduced many months ago), or selinux configured to disallow?  Maybe check syslog / journal / audit log.

You can disable netlink support in lws to get around it, -DLWS_WITH_NETLINK=0.  But it'd be good to understand what's different about your system.

-Andy




More information about the Libwebsockets mailing list