mosquitto-go-auth
mosquitto-go-auth copied to clipboard
Docker build failing to start WebSocket Listener
Using the latest tagged container mosquitto can not start a websocket listener
Using the following config file:
listener 1880
protocol websockets
And starting with:
docker run --rm -p 1880:1880 -v `pwd`/test.conf:/etc/mosquitto/mosquitto.conf iegomez/mosquitto-go-auth
I get the following output:
1656414132: mosquitto version 2.0.14 starting
1656414132: Config loaded from /etc/mosquitto/mosquitto.conf.
1656414132: Opening websockets listen socket on port 1980.
1656414132: Error: Unable to create websockets listener on port 1980.
I'll keep digging, but setting websockets_log_level hasn't shown anything useful yet
OK, so basic clean mosquitto won't start with just a websocket listener (but will if you also add a native listener) e.g.
listener 1883
listener 1884
protocol websockets
That conf works with a self built mosquitto 2.0.14, but not with the version in the iegomex/mosquitto-go-auth container.
docker run --rm -p 1884:1884 -v `pwd`/test.conf:/etc/mosquitto/mosquitto.conf iegomez/mosquitto-go-auth
1656420255: mosquitto version 2.0.14 starting
1656420255: Config loaded from /etc/mosquitto/mosquitto.conf.
1656420255: Opening ipv4 listen socket on port 1883.
1656420255: Opening ipv6 listen socket on port 1883.
1656420255: Opening websockets listen socket on port 1884.
1656420255: Error: Unable to create websockets listener on port 1884.
I've opened a separate issue against mosquitto for not starting with just a websocket listener, but that is different to this problem. https://github.com/eclipse/mosquitto/issues/2578
I've tracked this down, it's most likely to be down to the version of LWS. Please see https://github.com/warmcat/libwebsockets/issues/2449
Looks like this should be bumped from 2.4.2 to 4.2.0
And any chance of add this to the Dockerfile update #234 please
Bumping the version makes sense to me, but let's keep it separated from that PR to have clean history.