[Bug 262552] net/mosquitto: Mosquitto websockets support not working

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 17 Mar 2022 17:49:26 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262552

--- Comment #6 from Joseph <joji@eskimo.com> ---
(In reply to Joseph from comment #5)
---UPDATE---

I rebuilt mosquitto and libwebsockets (with LWS_WITH_EXTERNAL_POLL support) and
upon testing, the client/subscriber appears to be unable to keep a connection
open to the broker. It is closing connection immediately. See transcript below. 

The client appears to be retrying every 2 seconds.

I specified a "keepalive=300" value to the connect call, but it did not seem to
make a difference.

Works fine when using mqtt protocol. So, looks like the libwebsockets portion
is broken on FreeBSD. I tested on OpenBSD and websockets works fine there.
However, the versions there are: libwebsockets-2.4.2 and mosquitto-2.0.12.

[ Transcript from /var/log/daemon.log ]
Mar 17 13:09:22 nirmal mosquitto[6450]: 1647536962: New client connected from
192.168.50.210:25231 as wallace-client (p2, c1, k300, u'wallace').
Mar 17 13:09:22 nirmal mosquitto[6450]: 1647536962: Client wallace-client
closed its connection.
Mar 17 13:09:24 nirmal mosquitto[6450]: 1647536964: New client connected from
192.168.50.210:23099 as wallace-client (p2, c1, k300, u'wallace').
Mar 17 13:09:24 nirmal mosquitto[6450]: 1647536964: Client wallace-client
closed its connection.
Mar 17 13:09:26 nirmal mosquitto[6450]: 1647536966: New client connected from
192.168.50.210:3
001 as wallace-client (p2, c1, k300, u'wallace').
Mar 17 13:09:26 nirmal mosquitto[6450]: 1647536966: Client wallace-client
closed its connection.

[...]

Mar 17 13:15:32 nirmal mosquitto[6450]: 1647537332: New client connected from
192.168.50.210:9553 as wallace-client (p2, c1, k300, u'wallace').
Mar 17 13:15:32 nirmal mosquitto[6450]: 1647537332: Client wallace-client
closed its connection.

-- 
You are receiving this mail because:
You are the assignee for the bug.