MQTT doesn't work on HTTPS server

We are facing an issue in MQTT connection on HTTPS server. Sometime it works fine and for a while it gets an error like below.

WebSocket connection with 'wss: // MYHOST: 8083 / mqtt' failed: failed to establish connection: net :: ERR_INSECURE_RESPONSE

Let me share my mosquitto.conf file with you.

pid_file / var / run / mosquitto.pid
persistence | persistence_location / var / lib / mosquitto /
log_dest file /var/log/mosquitto/mosquitto.log
include_dir / etc / mosquitto / conf.d
listener 1883

listener 8083
protocol websockets
certfile / etc / mosquitto / certs / myhost.crt
cafile / etc / mosquitto / certs / ca.crt
keyfile / etc / mosquitto / certs / myhost.key

My Mosquitto WebSocket config file:

host = 'MYHOST'; // hostname or IP address
port = 8083;
theme = 'THEME'; // theme to subscribe to
useTLS = true;
username = ";
password =" ";
path =" / mqtt "

cleansession = true,

Thank.

+3


source to share





All Articles