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

andy at warmcat.com andy at warmcat.com
Tue Apr 20 04:54:59 CEST 2021

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.


More information about the Libwebsockets mailing list