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,270 points
1,434 views

1 answer to this question.

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,240 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,270 points
600 views
0 votes
1 answer

Where is published message stored by mosquitto broker if offline?

Well, of course, they are stored! That ...READ MORE

answered Aug 10, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
3,796 views
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,620 points
2,617 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,240 points

reshown Jul 6, 2018 by Vardhan 3,072 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,240 points
1,849 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,240 points
9,470 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
1,045 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,240 points
1,045 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP