Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.14 won't start with just a WebSocket listener enabled #2578

Open
hardillb opened this issue Jun 28, 2022 · 1 comment
Open

2.0.14 won't start with just a WebSocket listener enabled #2578

hardillb opened this issue Jun 28, 2022 · 1 comment

Comments

@hardillb
Copy link
Contributor

Built 2.0.14 from source, enabled WebSocket support on Ubuntu 20.04 (fully updated)

Following config file fails at startup:

allow_anonymous true
listener 1884
protocol websockets
mosquitto -c ./test.conf 
1656419034: mosquitto version 2.0.14 starting
1656419034: Config loaded from ./test.conf.
1656419034: Opening websockets listen socket on port 1884.
1656419034: Error: Unable to start any listening sockets, exiting.

Adding a native MQTT listener works:

allow_anonymous true
listener 1883 127.0.0.1
listener 1884
protocol websockets
mosquitto -c ./test.conf 
1656419113: mosquitto version 2.0.14 starting
1656419113: Config loaded from ./test.conf.
1656419113: Opening ipv4 listen socket on port 1883.
1656419113: Opening websockets listen socket on port 1884.
1656419113: mosquitto version 2.0.14 running

I should be able to start with mosquitto only listening for WebSocket Connections

@ralight
Copy link
Contributor

ralight commented Aug 6, 2022

I believe this is down to that version of libwebsockets not being compiled with LWS_WITH_EXTERNAL_POLL support. There's not much to be done - without that the websockets support doesn't really work properly. If you've got a normal listener as well, it looks like it works but you'll get occasional latency problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants