Package: mosquitto
Version: 2.0.11-1.1+b3
The libwebsockets-dev package in Bookworm is compiled without
"LWS_WITH_EXTERNAL_POLL=ON". This breaks compatibility with mosquitto,
which requires this option to be set in libwebsockets 4.1.6 to use
websockets.
Mosquitto is statically linked against libwebsockets in Bookworm.
However, the linked version does not have the LWS_WITH_EXTERNAL_POLL=ON
flag set either, since it is linked against libwebsockets.a file from
the libwebsockets-dev package.
These discussions show that "LWS_WITH_EXTERNAL_POLL=ON" is required:
https://github.com/eclipse/mosquitto/blob/v2.0.15/src/mosquitto_broker_internal.h#L26
https://bugs.archlinux.org/task/70321
https://github.com/eclipse/mosquitto/issues/2060
Since mosquitto it is statically linked, the problematic libwebsockets
code is inside that package as well.
Ideally, you would add "LWS_WITH_EXTERNAL_POLL=ON" to the build of
libwebsockets-dev and rebuild mosquitto. Alternatively you could disable
websocket support in mosquitto all together by removing the
WITH_WEBSOCKETS=yes flag.
I have the config file attached (stored in /etc/mosquitto/conf.d) that
results in unusable websockets, but testing the issue requires a
publisher to get some data in mosquitto and a subscriber via websockets
to reproduce the issue. There is no error message, there is simply no
data provided to the subscriber. Let me know if you need a test since it
is already documented that the "LWS_WITH_EXTERNAL_POLL=ON" flag is a
requirement for mosquitto with websockets enabled.
allow_anonymous true
listener 1883
listener 9001
protocol websockets
max_inflight_messages 0