Mosquitto 1.4.2 Websocket support

0 votes

I'm trying to utilize Mosquittos recent update to support websockets in the broker. I'm running Mosquitto v1.4.2 and I've added the following lines to the mosquitto configuration file (mosquitto.conf): (OS is CentOS)

listener 10001 127.0.0.1
protocol websockets

listener 1883
protocol mqtt

When I try and start the broker with the new configuration I get the following :

$ mosquitto -c /etc/mosquitto/mosquitto.conf
Error: Websockets support not available.
Error found at /etc/mosquitto/mosquitto.conf:16.
Error: Unable to open configuration file.

I was under the assumption that version 1.4 and above of Mosquitto has websocket support now (don't have to build from source to enable websocket support like you had to before v1.4) so I'm wondering what I'm missing. Any help on what direction to look to troubleshoot the problem is appreciated.

Jul 9, 2018 in IoT (Internet of Things) by Matt
• 2,260 points
75 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

In the dir mosquitto-1.4.X edit the file config.mk:

# Build with websockets support on the broker.
WITH_WEBSOCKETS:=yes

Then run in the dir mosquitto-1.4.X

make
sudo make install

Edit the configurations /etc/mosquitto/mosquitto.conf

listener 10001 127.0.0.1
protcol websockets

And restart

mosquitto -c /etc/mosquitto/mosquitto.conf
answered Jul 9, 2018 by anonymous2
• 4,260 points

Related Questions In IoT (Internet of Things)

0 votes
0 answers

Mosquitto Secure MQTT connection

My Question is regarding TLS/SSL MQTT connection. ...READ MORE

Jul 23, 2018 in IoT (Internet of Things) by Matt
• 2,260 points
36 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Mosquitto broker- Horizontally scaling

For accuracy, let me mention that other ...READ MORE

answered Sep 5, 2018 in IoT (Internet of Things) by Upasana
• 8,130 points
278 views
0 votes
1 answer

MQTT protocol connection error

Ok so you need two libraries to ...READ MORE

answered Jul 6, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points

reshown Jul 6, 2018 by Vardhan 311 views
0 votes
1 answer

IoT request response protocol

Based on your requirement of a light ...READ MORE

answered Jul 13, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
188 views
0 votes
1 answer

What is the maximum message length for a MQTT broker?

It's not entirely clear what you're asking ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
111 views
0 votes
1 answer

Node-RED, IOT Foundation Out Node Not Sending Commands

A simple test to check if the ...READ MORE

answered Jul 19, 2018 in IoT (Internet of Things) by TejaswiniUL
• 140 points
35 views
0 votes
1 answer
0 votes
1 answer

IOT service support for BACnet building automation systems

BACnet defines a multitude of transport protocols ...READ MORE

answered Sep 11, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
68 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.