I'm trying to run Mosquitto with WebSocket support on FreeBSD, but it's not working despite all efforts. Here's a summary of what I’ve done so far:
To run a WebSocket listener (port 9001) on Mosquitto so that clients (like MQTTX) can connect using the ws:// protocol.
I used mosquitto.config
And run this with command
It gave a message like opening websockets listen socket on port 9001
But when connecting through mqttx response is like it get connect then closes its connection in same time and is working fine with mqtt 1883. Can anyone suggest what I am doing wrong here?
To run a WebSocket listener (port 9001) on Mosquitto so that clients (like MQTTX) can connect using the ws:// protocol.
I used mosquitto.config
Code:
listener 1883
protocol mqtt
listener 9001
protocol websockets
allow_anonymous true
$ mosquitto -c mosquitto.config -v
It gave a message like opening websockets listen socket on port 9001
But when connecting through mqttx response is like it get connect then closes its connection in same time and is working fine with mqtt 1883. Can anyone suggest what I am doing wrong here?